diff --git a/doc/source/api/tree_objects.rst b/doc/source/api/tree_objects.rst index e310b91ccf..ff9e529ec4 100644 --- a/doc/source/api/tree_objects.rst +++ b/doc/source/api/tree_objects.rst @@ -21,6 +21,7 @@ ACP objects CylindricalSelectionRule SphericalSelectionRule TubeSelectionRule + VariableOffsetSelectionRule BooleanSelectionRule OrientedSelectionSet ModelingGroup diff --git a/poetry.lock b/poetry.lock index e3f23390ad..2350dc3526 100644 --- a/poetry.lock +++ b/poetry.lock @@ -164,7 +164,7 @@ protobuf = ">=3.19,<5" type = "git" url = "https://github.com/ansys-internal/ansys-api-acp.git" reference = "main" -resolved_reference = "3630e605abd4d950235b4d7b1631d6597e96d72c" +resolved_reference = "bbbedda5b51447e99ee739cc2e9fc1f14ae92246" [[package]] name = "ansys-api-mapdl" @@ -478,7 +478,7 @@ typing-extensions = "^4.0" type = "git" url = "https://github.com/ansys-internal/ansys-tools-local-product-launcher.git" reference = "main" -resolved_reference = "96639d903a779cbbbd27de78b9f86e26b3f790dc" +resolved_reference = "f62c4a4f2888db6853ba1ef9d5c5b21ae6c8cbd5" [[package]] name = "ansys-tools-path" @@ -1001,13 +1001,13 @@ files = [ [[package]] name = "click" -version = "8.1.6" +version = "8.1.7" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, - {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, ] [package.dependencies] @@ -1344,45 +1344,45 @@ testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "p [[package]] name = "fonttools" -version = "4.42.0" +version = "4.42.1" description = "Tools to manipulate font files" optional = false python-versions = ">=3.8" files = [ - {file = "fonttools-4.42.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9c456d1f23deff64ffc8b5b098718e149279abdea4d8692dba69172fb6a0d597"}, - {file = "fonttools-4.42.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:150122ed93127a26bc3670ebab7e2add1e0983d30927733aec327ebf4255b072"}, - {file = "fonttools-4.42.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48e82d776d2e93f88ca56567509d102266e7ab2fb707a0326f032fe657335238"}, - {file = "fonttools-4.42.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58c1165f9b2662645de9b19a8c8bdd636b36294ccc07e1b0163856b74f10bafc"}, - {file = "fonttools-4.42.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2d6dc3fa91414ff4daa195c05f946e6a575bd214821e26d17ca50f74b35b0fe4"}, - {file = "fonttools-4.42.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fae4e801b774cc62cecf4a57b1eae4097903fced00c608d9e2bc8f84cd87b54a"}, - {file = "fonttools-4.42.0-cp310-cp310-win32.whl", hash = "sha256:b8600ae7dce6ec3ddfb201abb98c9d53abbf8064d7ac0c8a0d8925e722ccf2a0"}, - {file = "fonttools-4.42.0-cp310-cp310-win_amd64.whl", hash = "sha256:57b68eab183fafac7cd7d464a7bfa0fcd4edf6c67837d14fb09c1c20516cf20b"}, - {file = "fonttools-4.42.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0a1466713e54bdbf5521f2f73eebfe727a528905ff5ec63cda40961b4b1eea95"}, - {file = "fonttools-4.42.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3fb2a69870bfe143ec20b039a1c8009e149dd7780dd89554cc8a11f79e5de86b"}, - {file = "fonttools-4.42.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae881e484702efdb6cf756462622de81d4414c454edfd950b137e9a7352b3cb9"}, - {file = "fonttools-4.42.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27ec3246a088555629f9f0902f7412220c67340553ca91eb540cf247aacb1983"}, - {file = "fonttools-4.42.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8ece1886d12bb36c48c00b2031518877f41abae317e3a55620d38e307d799b7e"}, - {file = "fonttools-4.42.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:10dac980f2b975ef74532e2a94bb00e97a95b4595fb7f98db493c474d5f54d0e"}, - {file = "fonttools-4.42.0-cp311-cp311-win32.whl", hash = "sha256:83b98be5d291e08501bd4fc0c4e0f8e6e05b99f3924068b17c5c9972af6fff84"}, - {file = "fonttools-4.42.0-cp311-cp311-win_amd64.whl", hash = "sha256:e35bed436726194c5e6e094fdfb423fb7afaa0211199f9d245e59e11118c576c"}, - {file = "fonttools-4.42.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c36c904ce0322df01e590ba814d5d69e084e985d7e4c2869378671d79662a7d4"}, - {file = "fonttools-4.42.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d54e600a2bcfa5cdaa860237765c01804a03b08404d6affcd92942fa7315ffba"}, - {file = "fonttools-4.42.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01cfe02416b6d416c5c8d15e30315cbcd3e97d1b50d3b34b0ce59f742ef55258"}, - {file = "fonttools-4.42.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f81ed9065b4bd3f4f3ce8e4873cd6a6b3f4e92b1eddefde35d332c6f414acc3"}, - {file = "fonttools-4.42.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:685a4dd6cf31593b50d6d441feb7781a4a7ef61e19551463e14ed7c527b86f9f"}, - {file = "fonttools-4.42.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:329341ba3d86a36e482610db56b30705384cb23bd595eac8cbb045f627778e9d"}, - {file = "fonttools-4.42.0-cp38-cp38-win32.whl", hash = "sha256:4655c480a1a4d706152ff54f20e20cf7609084016f1df3851cce67cef768f40a"}, - {file = "fonttools-4.42.0-cp38-cp38-win_amd64.whl", hash = "sha256:6bd7e4777bff1dcb7c4eff4786998422770f3bfbef8be401c5332895517ba3fa"}, - {file = "fonttools-4.42.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a9b55d2a3b360e0c7fc5bd8badf1503ca1c11dd3a1cd20f2c26787ffa145a9c7"}, - {file = "fonttools-4.42.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0df8ef75ba5791e873c9eac2262196497525e3f07699a2576d3ab9ddf41cb619"}, - {file = "fonttools-4.42.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cd2363ea7728496827658682d049ffb2e98525e2247ca64554864a8cc945568"}, - {file = "fonttools-4.42.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d40673b2e927f7cd0819c6f04489dfbeb337b4a7b10fc633c89bf4f34ecb9620"}, - {file = "fonttools-4.42.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c8bf88f9e3ce347c716921804ef3a8330cb128284eb6c0b6c4b3574f3c580023"}, - {file = "fonttools-4.42.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:703101eb0490fae32baf385385d47787b73d9ea55253df43b487c89ec767e0d7"}, - {file = "fonttools-4.42.0-cp39-cp39-win32.whl", hash = "sha256:f0290ea7f9945174bd4dfd66e96149037441eb2008f3649094f056201d99e293"}, - {file = "fonttools-4.42.0-cp39-cp39-win_amd64.whl", hash = "sha256:ae7df0ae9ee2f3f7676b0ff6f4ebe48ad0acaeeeaa0b6839d15dbf0709f2c5ef"}, - {file = "fonttools-4.42.0-py3-none-any.whl", hash = "sha256:dfe7fa7e607f7e8b58d0c32501a3a7cac148538300626d1b930082c90ae7f6bd"}, - {file = "fonttools-4.42.0.tar.gz", hash = "sha256:614b1283dca88effd20ee48160518e6de275ce9b5456a3134d5f235523fc5065"}, + {file = "fonttools-4.42.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ed1a13a27f59d1fc1920394a7f596792e9d546c9ca5a044419dca70c37815d7c"}, + {file = "fonttools-4.42.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c9b1ce7a45978b821a06d375b83763b27a3a5e8a2e4570b3065abad240a18760"}, + {file = "fonttools-4.42.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f720fa82a11c0f9042376fd509b5ed88dab7e3cd602eee63a1af08883b37342b"}, + {file = "fonttools-4.42.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db55cbaea02a20b49fefbd8e9d62bd481aaabe1f2301dabc575acc6b358874fa"}, + {file = "fonttools-4.42.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3a35981d90feebeaef05e46e33e6b9e5b5e618504672ca9cd0ff96b171e4bfff"}, + {file = "fonttools-4.42.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:68a02bbe020dc22ee0540e040117535f06df9358106d3775e8817d826047f3fd"}, + {file = "fonttools-4.42.1-cp310-cp310-win32.whl", hash = "sha256:12a7c247d1b946829bfa2f331107a629ea77dc5391dfd34fdcd78efa61f354ca"}, + {file = "fonttools-4.42.1-cp310-cp310-win_amd64.whl", hash = "sha256:a398bdadb055f8de69f62b0fc70625f7cbdab436bbb31eef5816e28cab083ee8"}, + {file = "fonttools-4.42.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:689508b918332fb40ce117131633647731d098b1b10d092234aa959b4251add5"}, + {file = "fonttools-4.42.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e36344e48af3e3bde867a1ca54f97c308735dd8697005c2d24a86054a114a71"}, + {file = "fonttools-4.42.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19b7db825c8adee96fac0692e6e1ecd858cae9affb3b4812cdb9d934a898b29e"}, + {file = "fonttools-4.42.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:113337c2d29665839b7d90b39f99b3cac731f72a0eda9306165a305c7c31d341"}, + {file = "fonttools-4.42.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:37983b6bdab42c501202500a2be3a572f50d4efe3237e0686ee9d5f794d76b35"}, + {file = "fonttools-4.42.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6ed2662a3d9c832afa36405f8748c250be94ae5dfc5283d668308391f2102861"}, + {file = "fonttools-4.42.1-cp311-cp311-win32.whl", hash = "sha256:179737095eb98332a2744e8f12037b2977f22948cf23ff96656928923ddf560a"}, + {file = "fonttools-4.42.1-cp311-cp311-win_amd64.whl", hash = "sha256:f2b82f46917d8722e6b5eafeefb4fb585d23babd15d8246c664cd88a5bddd19c"}, + {file = "fonttools-4.42.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:62f481ac772fd68901573956231aea3e4b1ad87b9b1089a61613a91e2b50bb9b"}, + {file = "fonttools-4.42.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f2f806990160d1ce42d287aa419df3ffc42dfefe60d473695fb048355fe0c6a0"}, + {file = "fonttools-4.42.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db372213d39fa33af667c2aa586a0c1235e88e9c850f5dd5c8e1f17515861868"}, + {file = "fonttools-4.42.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d18fc642fd0ac29236ff88ecfccff229ec0386090a839dd3f1162e9a7944a40"}, + {file = "fonttools-4.42.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8708b98c278012ad267ee8a7433baeb809948855e81922878118464b274c909d"}, + {file = "fonttools-4.42.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c95b0724a6deea2c8c5d3222191783ced0a2f09bd6d33f93e563f6f1a4b3b3a4"}, + {file = "fonttools-4.42.1-cp38-cp38-win32.whl", hash = "sha256:4aa79366e442dbca6e2c8595645a3a605d9eeabdb7a094d745ed6106816bef5d"}, + {file = "fonttools-4.42.1-cp38-cp38-win_amd64.whl", hash = "sha256:acb47f6f8680de24c1ab65ebde39dd035768e2a9b571a07c7b8da95f6c8815fd"}, + {file = "fonttools-4.42.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5fb289b7a815638a7613d46bcf324c9106804725b2bb8ad913c12b6958ffc4ec"}, + {file = "fonttools-4.42.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:53eb5091ddc8b1199330bb7b4a8a2e7995ad5d43376cadce84523d8223ef3136"}, + {file = "fonttools-4.42.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46a0ec8adbc6ff13494eb0c9c2e643b6f009ce7320cf640de106fb614e4d4360"}, + {file = "fonttools-4.42.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cc7d685b8eeca7ae69dc6416833fbfea61660684b7089bca666067cb2937dcf"}, + {file = "fonttools-4.42.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:be24fcb80493b2c94eae21df70017351851652a37de514de553435b256b2f249"}, + {file = "fonttools-4.42.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:515607ec756d7865f23070682622c49d922901943697871fc292277cf1e71967"}, + {file = "fonttools-4.42.1-cp39-cp39-win32.whl", hash = "sha256:0eb79a2da5eb6457a6f8ab904838454accc7d4cccdaff1fd2bd3a0679ea33d64"}, + {file = "fonttools-4.42.1-cp39-cp39-win_amd64.whl", hash = "sha256:7286aed4ea271df9eab8d7a9b29e507094b51397812f7ce051ecd77915a6e26b"}, + {file = "fonttools-4.42.1-py3-none-any.whl", hash = "sha256:9398f244e28e0596e2ee6024f808b06060109e33ed38dcc9bded452fd9bbb853"}, + {file = "fonttools-4.42.1.tar.gz", hash = "sha256:c391cd5af88aacaf41dd7cfb96eeedfad297b5899a39e12f4c2c3706d0a3329d"}, ] [package.extras] @@ -1676,13 +1676,13 @@ pyparsing = {version = ">=2.4.2,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.0.2 || >3.0 [[package]] name = "hypothesis" -version = "6.82.4" +version = "6.82.6" description = "A library for property-based testing" optional = false python-versions = ">=3.8" files = [ - {file = "hypothesis-6.82.4-py3-none-any.whl", hash = "sha256:3f1e730ea678d01ad2183325b1350faa6b097b98ced1e97e0ba67bcf5e2439ea"}, - {file = "hypothesis-6.82.4.tar.gz", hash = "sha256:11f32a66cf361a72f2a36527a15639ea6814d1dbf54782c3a8ea31585d62ab27"}, + {file = "hypothesis-6.82.6-py3-none-any.whl", hash = "sha256:e99c445140e43f1cceda07b569f2f2d920d95435c6b0e6b507b35b01bb025e9d"}, + {file = "hypothesis-6.82.6.tar.gz", hash = "sha256:f52ac4180a16208224e3d648fbf0fef8b9ca24863ba4b41bfef30a78c42646bd"}, ] [package.dependencies] @@ -1828,13 +1828,13 @@ test = ["nbval (>=0.9.2)", "pytest (>=4)", "pytest-cov"] [[package]] name = "ipyevents" -version = "2.0.1" +version = "2.0.2" description = "A custom widget for returning mouse and keyboard events to Python" optional = false -python-versions = "*" +python-versions = ">=3.6" files = [ - {file = "ipyevents-2.0.1-py2.py3-none-any.whl", hash = "sha256:9f255fdab40e7598b1143ace90153c5f4e52be15dc6f1b94f575a043a5970c17"}, - {file = "ipyevents-2.0.1.tar.gz", hash = "sha256:23eb2afab13d9056397f120a88051dd3beb067b698d08b33adffc9e077f019cb"}, + {file = "ipyevents-2.0.2-py3-none-any.whl", hash = "sha256:60c2a9e992bdc41e8577aa27e57b124efafa48a59a3bff886029fe5700d546b3"}, + {file = "ipyevents-2.0.2.tar.gz", hash = "sha256:26e878b0c5854bc8b6bd6a2bd2c89b314ebe86fda642f4d2434051545bab258f"}, ] [package.dependencies] @@ -2171,13 +2171,13 @@ jupyter-server = ">=1.1.2" [[package]] name = "jupyter-server" -version = "2.7.1" +version = "2.7.2" description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications." optional = false python-versions = ">=3.8" files = [ - {file = "jupyter_server-2.7.1-py3-none-any.whl", hash = "sha256:59838bf20759354e2b4222fed702948a934cb21a503e21cd5b03706a456391d9"}, - {file = "jupyter_server-2.7.1.tar.gz", hash = "sha256:76b4ae0b568c331acc9aa904fc4a1194ef9bdefa69f232deb3f3cae802528c05"}, + {file = "jupyter_server-2.7.2-py3-none-any.whl", hash = "sha256:98a375347b580e837e7016007c24680a4261ed8ad7cd35196ac087d229f48e5a"}, + {file = "jupyter_server-2.7.2.tar.gz", hash = "sha256:d64fb4e593907290e5df916e3c9399c15ab2cd7bdb71cbcd1d36452dbfb30523"}, ] [package.dependencies] @@ -2737,33 +2737,38 @@ files = [ [[package]] name = "mypy" -version = "1.5.0" +version = "1.5.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ad3109bec37cc33654de8db30fe8ff3a1bb57ea65144167d68185e6dced9868d"}, - {file = "mypy-1.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b4ea3a0241cb005b0ccdbd318fb99619b21ae51bcf1660b95fc22e0e7d3ba4a1"}, - {file = "mypy-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1fe816e26e676c1311b9e04fd576543b873576d39439f7c24c8e5c7728391ecf"}, - {file = "mypy-1.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:42170e68adb1603ccdc55a30068f72bcfcde2ce650188e4c1b2a93018b826735"}, - {file = "mypy-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:d145b81a8214687cfc1f85c03663a5bbe736777410e5580e54d526e7e904f564"}, - {file = "mypy-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c36011320e452eb30bec38b9fd3ba20569dc9545d7d4540d967f3ea1fab9c374"}, - {file = "mypy-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f3940cf5845b2512b3ab95463198b0cdf87975dfd17fdcc6ce9709a9abe09e69"}, - {file = "mypy-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9166186c498170e1ff478a7f540846b2169243feb95bc228d39a67a1a450cdc6"}, - {file = "mypy-1.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:725b57a19b7408ef66a0fd9db59b5d3e528922250fb56e50bded27fea9ff28f0"}, - {file = "mypy-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:eec5c927aa4b3e8b4781840f1550079969926d0a22ce38075f6cfcf4b13e3eb4"}, - {file = "mypy-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79c520aa24f21852206b5ff2cf746dc13020113aa73fa55af504635a96e62718"}, - {file = "mypy-1.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:769ddb6bfe55c2bd9c7d6d7020885a5ea14289619db7ee650e06b1ef0852c6f4"}, - {file = "mypy-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbf18f8db7e5f060d61c91e334d3b96d6bb624ddc9ee8a1cde407b737acbca2c"}, - {file = "mypy-1.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a2500ad063413bc873ae102cf655bf49889e0763b260a3a7cf544a0cbbf7e70a"}, - {file = "mypy-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:84cf9f7d8a8a22bb6a36444480f4cbf089c917a4179fbf7eea003ea931944a7f"}, - {file = "mypy-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a551ed0fc02455fe2c1fb0145160df8336b90ab80224739627b15ebe2b45e9dc"}, - {file = "mypy-1.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:372fd97293ed0076d52695849f59acbbb8461c4ab447858cdaeaf734a396d823"}, - {file = "mypy-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8a7444d6fcac7e2585b10abb91ad900a576da7af8f5cffffbff6065d9115813"}, - {file = "mypy-1.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:35b13335c6c46a386577a51f3d38b2b5d14aa619e9633bb756bd77205e4bd09f"}, - {file = "mypy-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:2c9d570f53908cbea326ad8f96028a673b814d9dca7515bf71d95fa662c3eb6f"}, - {file = "mypy-1.5.0-py3-none-any.whl", hash = "sha256:69b32d0dedd211b80f1b7435644e1ef83033a2af2ac65adcdc87c38db68a86be"}, - {file = "mypy-1.5.0.tar.gz", hash = "sha256:f3460f34b3839b9bc84ee3ed65076eb827cd99ed13ed08d723f9083cada4a212"}, + {file = "mypy-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f33592ddf9655a4894aef22d134de7393e95fcbdc2d15c1ab65828eee5c66c70"}, + {file = "mypy-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:258b22210a4a258ccd077426c7a181d789d1121aca6db73a83f79372f5569ae0"}, + {file = "mypy-1.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9ec1f695f0c25986e6f7f8778e5ce61659063268836a38c951200c57479cc12"}, + {file = "mypy-1.5.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:abed92d9c8f08643c7d831300b739562b0a6c9fcb028d211134fc9ab20ccad5d"}, + {file = "mypy-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:a156e6390944c265eb56afa67c74c0636f10283429171018446b732f1a05af25"}, + {file = "mypy-1.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6ac9c21bfe7bc9f7f1b6fae441746e6a106e48fc9de530dea29e8cd37a2c0cc4"}, + {file = "mypy-1.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:51cb1323064b1099e177098cb939eab2da42fea5d818d40113957ec954fc85f4"}, + {file = "mypy-1.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:596fae69f2bfcb7305808c75c00f81fe2829b6236eadda536f00610ac5ec2243"}, + {file = "mypy-1.5.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:32cb59609b0534f0bd67faebb6e022fe534bdb0e2ecab4290d683d248be1b275"}, + {file = "mypy-1.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:159aa9acb16086b79bbb0016145034a1a05360626046a929f84579ce1666b315"}, + {file = "mypy-1.5.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f6b0e77db9ff4fda74de7df13f30016a0a663928d669c9f2c057048ba44f09bb"}, + {file = "mypy-1.5.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:26f71b535dfc158a71264e6dc805a9f8d2e60b67215ca0bfa26e2e1aa4d4d373"}, + {file = "mypy-1.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fc3a600f749b1008cc75e02b6fb3d4db8dbcca2d733030fe7a3b3502902f161"}, + {file = "mypy-1.5.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:26fb32e4d4afa205b24bf645eddfbb36a1e17e995c5c99d6d00edb24b693406a"}, + {file = "mypy-1.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:82cb6193de9bbb3844bab4c7cf80e6227d5225cc7625b068a06d005d861ad5f1"}, + {file = "mypy-1.5.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4a465ea2ca12804d5b34bb056be3a29dc47aea5973b892d0417c6a10a40b2d65"}, + {file = "mypy-1.5.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9fece120dbb041771a63eb95e4896791386fe287fefb2837258925b8326d6160"}, + {file = "mypy-1.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d28ddc3e3dfeab553e743e532fb95b4e6afad51d4706dd22f28e1e5e664828d2"}, + {file = "mypy-1.5.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:57b10c56016adce71fba6bc6e9fd45d8083f74361f629390c556738565af8eeb"}, + {file = "mypy-1.5.1-cp38-cp38-win_amd64.whl", hash = "sha256:ff0cedc84184115202475bbb46dd99f8dcb87fe24d5d0ddfc0fe6b8575c88d2f"}, + {file = "mypy-1.5.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8f772942d372c8cbac575be99f9cc9d9fb3bd95c8bc2de6c01411e2c84ebca8a"}, + {file = "mypy-1.5.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5d627124700b92b6bbaa99f27cbe615c8ea7b3402960f6372ea7d65faf376c14"}, + {file = "mypy-1.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:361da43c4f5a96173220eb53340ace68cda81845cd88218f8862dfb0adc8cddb"}, + {file = "mypy-1.5.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:330857f9507c24de5c5724235e66858f8364a0693894342485e543f5b07c8693"}, + {file = "mypy-1.5.1-cp39-cp39-win_amd64.whl", hash = "sha256:c543214ffdd422623e9fedd0869166c2f16affe4ba37463975043ef7d2ea8770"}, + {file = "mypy-1.5.1-py3-none-any.whl", hash = "sha256:f757063a83970d67c444f6e01d9550a7402322af3557ce7630d3c957386fa8f5"}, + {file = "mypy-1.5.1.tar.gz", hash = "sha256:b031b9601f1060bf1281feab89697324726ba0c0bae9d7cd7ab4b690940f0b92"}, ] [package.dependencies] @@ -2811,13 +2816,13 @@ test = ["flaky", "ipykernel (>=6.19.3)", "ipython", "ipywidgets", "nbconvert (>= [[package]] name = "nbconvert" -version = "7.7.3" +version = "7.7.4" description = "Converting Jupyter Notebooks" optional = false python-versions = ">=3.8" files = [ - {file = "nbconvert-7.7.3-py3-none-any.whl", hash = "sha256:3022adadff3f86578a47fab7c2228bb3ca9c56a24345642a22f917f6168b48fc"}, - {file = "nbconvert-7.7.3.tar.gz", hash = "sha256:4a5996bf5f3cd16aa0431897ba1aa4c64842c2079f434b3dc6b8c4b252ef3355"}, + {file = "nbconvert-7.7.4-py3-none-any.whl", hash = "sha256:ace26f4386d08eb5c55833596a942048c5502a95e05590cb523826a749a40a37"}, + {file = "nbconvert-7.7.4.tar.gz", hash = "sha256:1113d039fa3fc3a846ffa5a3b0a019e85aaa94c566a09fa0c400fb7638e46087"}, ] [package.dependencies] @@ -3769,21 +3774,21 @@ trame = ["trame (>=2.5.2)", "trame-vtk (>=2.5.8)", "trame-vuetify (>=2.3.1)"] [[package]] name = "pyviz-comms" -version = "2.3.2" -description = "Bidirectional communication for the HoloViz ecosystem." +version = "3.0.0" +description = "A JupyterLab extension for rendering HoloViz content." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pyviz_comms-2.3.2-py2.py3-none-any.whl", hash = "sha256:2e9f6574409ef6c44331b41ff254cbde05fffca140aca8ac47ca13d9223b4499"}, - {file = "pyviz_comms-2.3.2.tar.gz", hash = "sha256:542a10fed8242d3a9d468ed0a14d6a2537e589c3f8a7986c79c374591254d6b4"}, + {file = "pyviz_comms-3.0.0-py3-none-any.whl", hash = "sha256:91c967151b1e4d436c458c147a31991a42fbe7567e49176e4eb5b8dc8e20f1ff"}, + {file = "pyviz_comms-3.0.0.tar.gz", hash = "sha256:f4ca91e4157a64e3abed7cc249e60b9a8d2532f8832f1cb075914d19337d2ba6"}, ] [package.dependencies] param = "*" [package.extras] -all = ["flake8", "jupyter-packaging (>=0.7.9,<0.8.0)", "jupyterlab (>=3.0,<4.0)", "keyring", "pytest", "rfc3986", "setuptools (>=40.8.0)", "twine"] -build = ["jupyter-packaging (>=0.7.9,<0.8.0)", "jupyterlab (>=3.0,<4.0)", "keyring", "rfc3986", "setuptools (>=40.8.0)", "twine"] +all = ["pyviz-comms[build]", "pyviz-comms[tests]"] +build = ["jupyterlab (>=4.0,<5.0)", "keyring", "rfc3986", "setuptools (>=40.8.0)", "twine"] tests = ["flake8", "pytest"] [[package]] @@ -4228,17 +4233,17 @@ win32 = ["pywin32"] [[package]] name = "setuptools" -version = "68.1.0" +version = "68.1.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-68.1.0-py3-none-any.whl", hash = "sha256:e13e1b0bc760e9b0127eda042845999b2f913e12437046e663b833aa96d89715"}, - {file = "setuptools-68.1.0.tar.gz", hash = "sha256:d59c97e7b774979a5ccb96388efc9eb65518004537e85d52e81eaee89ab6dd91"}, + {file = "setuptools-68.1.2-py3-none-any.whl", hash = "sha256:3d8083eed2d13afc9426f227b24fd1659489ec107c0e86cec2ffdde5c92e790b"}, + {file = "setuptools-68.1.2.tar.gz", hash = "sha256:3d4dfa6d95f1b101d695a6160a7626e15583af71a5f52176efa5d39a054d475d"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5,<=7.1.2)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] @@ -4628,13 +4633,13 @@ test = ["numpy", "pandas", "pytest", "xarray"] [[package]] name = "trame" -version = "3.2.1" +version = "3.2.4" description = "Trame, a framework to build applications in plain Python" optional = false python-versions = "*" files = [ - {file = "trame-3.2.1-py3-none-any.whl", hash = "sha256:11e8c61451dd38c6afa7ba537087a4d5389f172883ad53ef71eb5286edfbf037"}, - {file = "trame-3.2.1.tar.gz", hash = "sha256:31a36f4dd7ebba436a0dd868fc1088fc7819f800cfa8bd740965227d0d4d03e3"}, + {file = "trame-3.2.4-py3-none-any.whl", hash = "sha256:7d4f402b4a3c50fefa2889295dbfb87b7e869c3f7ea9045e413fbedeef0f4fa9"}, + {file = "trame-3.2.4.tar.gz", hash = "sha256:85b24e4a83cc9cb61854f55db2d5ace8b58468b31f696fa19e576487f62e4152"}, ] [package.dependencies] diff --git a/src/ansys/acp/core/__init__.py b/src/ansys/acp/core/__init__.py index 5d014ff83c..44c763e74f 100644 --- a/src/ansys/acp/core/__init__.py +++ b/src/ansys/acp/core/__init__.py @@ -32,6 +32,7 @@ SubLaminate, TubeSelectionRule, UnitSystemType, + VariableOffsetSelectionRule, ) __version__ = importlib.metadata.version(__name__.replace(".", "-")) @@ -47,6 +48,7 @@ "Model", "Material", "Fabric", + "SubLaminate", "ElementSet", "EdgeSet", "EdgeSetType", @@ -59,6 +61,7 @@ "CylindricalSelectionRule", "SphericalSelectionRule", "TubeSelectionRule", + "VariableOffsetSelectionRule", "BooleanSelectionRule", "LinkedSelectionRule", "OrientedSelectionSet", diff --git a/src/ansys/acp/core/_tree_objects/__init__.py b/src/ansys/acp/core/_tree_objects/__init__.py index 4d648b702b..9cfedc0d92 100644 --- a/src/ansys/acp/core/_tree_objects/__init__.py +++ b/src/ansys/acp/core/_tree_objects/__init__.py @@ -22,6 +22,7 @@ from .stackup import FabricWithAngle, Stackup from .sublaminate import Lamina, SubLaminate from .tube_selection_rule import TubeSelectionRule +from .variable_offset_selection_rule import VariableOffsetSelectionRule __all__ = [ "Model", @@ -43,6 +44,7 @@ "CylindricalSelectionRule", "SphericalSelectionRule", "TubeSelectionRule", + "VariableOffsetSelectionRule", "BooleanSelectionRule", "LinkedSelectionRule", "OrientedSelectionSet", diff --git a/src/ansys/acp/core/_tree_objects/enums.py b/src/ansys/acp/core/_tree_objects/enums.py index f8085ff137..a45e723cd3 100644 --- a/src/ansys/acp/core/_tree_objects/enums.py +++ b/src/ansys/acp/core/_tree_objects/enums.py @@ -17,6 +17,7 @@ "RosetteSelectionMethod", "CutoffMaterialType", "DropoffMaterialType", + "DrapingType", "DrapingMaterialType", "PlyType", "UnitSystemType", @@ -53,6 +54,12 @@ "DropoffMaterialType", drop_off_material_pb2.MaterialHandlingType, module=__name__ ) +( + DrapingType, + draping_type_to_pb, + draping_type_from_pb, +) = wrap_to_string_enum("DrapingType", ply_material_pb2.DrapingType, module=__name__) + ( DrapingMaterialType, draping_material_type_to_pb, diff --git a/src/ansys/acp/core/_tree_objects/linked_selection_rule.py b/src/ansys/acp/core/_tree_objects/linked_selection_rule.py index 68932bc70a..dff2b87e84 100644 --- a/src/ansys/acp/core/_tree_objects/linked_selection_rule.py +++ b/src/ansys/acp/core/_tree_objects/linked_selection_rule.py @@ -19,6 +19,7 @@ from .parallel_selection_rule import ParallelSelectionRule from .spherical_selection_rule import SphericalSelectionRule from .tube_selection_rule import TubeSelectionRule +from .variable_offset_selection_rule import VariableOffsetSelectionRule if typing.TYPE_CHECKING: # Since the 'LinkedSelectionRule' class is used by the boolean selection rule, @@ -30,6 +31,7 @@ CylindricalSelectionRule, SphericalSelectionRule, TubeSelectionRule, + VariableOffsetSelectionRule, BooleanSelectionRule, ] @@ -67,7 +69,7 @@ class LinkedSelectionRule(GenericEdgePropertyType): :class:`.TubeSelectionRule` ``outer_radius`` ``inner_radius`` (TODO: CutOffSelectionRule) \- \- (TODO: GeometricalSelectionRule) (TODO: in-plane capture tolerance) \- - (TODO: VariableOffsetSelectionRule) \- \- + :class:`.VariableOffsetSelectionRule` \- \- :class:`.BooleanSelectionRule` \- \- ====================================== ================================== =================== """ @@ -154,6 +156,7 @@ def _from_pb_object( CylindricalSelectionRule, SphericalSelectionRule, TubeSelectionRule, + VariableOffsetSelectionRule, BooleanSelectionRule, ] if not isinstance(parent_object, type_) diff --git a/src/ansys/acp/core/_tree_objects/model.py b/src/ansys/acp/core/_tree_objects/model.py index 12ba1c9b47..02d2130942 100644 --- a/src/ansys/acp/core/_tree_objects/model.py +++ b/src/ansys/acp/core/_tree_objects/model.py @@ -30,6 +30,7 @@ stackup_pb2_grpc, sublaminate_pb2_grpc, tube_selection_rule_pb2_grpc, + variable_offset_selection_rule_pb2_grpc, ) from ansys.api.acp.v0.base_pb2 import CollectionPath @@ -63,6 +64,7 @@ from .stackup import Stackup from .sublaminate import SubLaminate from .tube_selection_rule import TubeSelectionRule +from .variable_offset_selection_rule import VariableOffsetSelectionRule __all__ = ["MeshData", "Model", "ModelElementalData", "ModelNodalData"] @@ -323,6 +325,9 @@ def export_materials(self, path: _PATH) -> None: create_tube_selection_rule, tube_selection_rules = define_mutable_mapping( TubeSelectionRule, tube_selection_rule_pb2_grpc.ObjectServiceStub ) + create_variable_offset_selection_rule, variable_offset_selection_rules = define_mutable_mapping( + VariableOffsetSelectionRule, variable_offset_selection_rule_pb2_grpc.ObjectServiceStub + ) create_boolean_selection_rule, boolean_selection_rules = define_mutable_mapping( BooleanSelectionRule, boolean_selection_rule_pb2_grpc.ObjectServiceStub ) diff --git a/src/ansys/acp/core/_tree_objects/modeling_ply.py b/src/ansys/acp/core/_tree_objects/modeling_ply.py index 916927b5e8..b67f4ae7b7 100644 --- a/src/ansys/acp/core/_tree_objects/modeling_ply.py +++ b/src/ansys/acp/core/_tree_objects/modeling_ply.py @@ -8,6 +8,7 @@ from ansys.api.acp.v0 import modeling_ply_pb2, modeling_ply_pb2_grpc, production_ply_pb2_grpc +from .._utils.array_conversions import to_1D_double_array, to_tuple_from_1D_array from ._grpc_helpers.edge_property_list import define_edge_property_list from ._grpc_helpers.linked_object_list import define_linked_object_list from ._grpc_helpers.mapping import get_read_only_collection_property @@ -19,9 +20,11 @@ ) from ._mesh_data import ElementalData, NodalData, elemental_data_property, nodal_data_property from .base import CreatableTreeObject, IdTreeObject -from .enums import status_type_from_pb +from .enums import DrapingType, draping_type_from_pb, draping_type_to_pb, status_type_from_pb from .fabric import Fabric from .linked_selection_rule import LinkedSelectionRule +from .lookup_table_1d_column import LookUpTable1DColumn +from .lookup_table_3d_column import LookUpTable3DColumn from .object_registry import register from .oriented_selection_set import OrientedSelectionSet from .production_ply import ProductionPly @@ -70,9 +73,40 @@ class ModelingPly(CreatableTreeObject, IdTreeObject): ---------- name : The name of the ModelingPly - + ply_material : + The material (fabric, stackup or sub-laminate) of the ply. + ply_angle : + Design angle between the reference direction and the ply fiber direction. + number_of_layers : + Number of times the plies are generated. + active : + Inactive plies are ignored in ACP and the downstream analysis. + global_ply_nr : + Defines the global ply order. selection_rules : Selection Rules which may limit the extent of the ply. + draping : + Chooses between different draping formulations. + draping_seed_point : + Starting point of the draping algorithm. + auto_draping_direction : + If ``True``, the fiber direction of the production ply at the draping + seed point is used as draping direction. + draping_direction : + Set the primary draping direction for the draping algorithm. Only used if + ``auto_draping_direction`` is ``False``. + draping_mesh_size : + Defines the mesh size for the draping algorithm. If set to ``-1.``, the + mesh size is automatically determined based on the average element size. + draping_thickness_correction : + Enables the thickness correction of draped plies based on the draping + shear angle. + draping_angle_1_field : + Correction angle between the fiber and draped fiber directions, in degree. + draping_angle_2_field : + Correction angle between the transverse and draped transverse directions, + in degree. Optional, uses the same values as ``draping_angle_1_field`` + (no shear) by default. """ __slots__: Iterable[str] = tuple() @@ -93,6 +127,14 @@ def __init__( # if global_ply_nr == 0 global_ply_nr: int = 0, selection_rules: Iterable[LinkedSelectionRule] = (), + draping: DrapingType = DrapingType.NO_DRAPING, + draping_seed_point: tuple[float, float, float] = (0.0, 0.0, 0.0), + auto_draping_direction: bool = True, + draping_direction: tuple[float, float, float] = (1.0, 0.0, 0.0), + draping_mesh_size: float = -1.0, + draping_thickness_correction: bool = True, + draping_angle_1_field: LookUpTable1DColumn | LookUpTable3DColumn | None = None, + draping_angle_2_field: LookUpTable1DColumn | LookUpTable3DColumn | None = None, ): super().__init__(name=name) @@ -103,6 +145,14 @@ def __init__( self.active = active self.global_ply_nr = global_ply_nr self.selection_rules = selection_rules + self.draping = draping + self.draping_seed_point = draping_seed_point + self.auto_draping_direction = auto_draping_direction + self.draping_direction = draping_direction + self.draping_mesh_size = draping_mesh_size + self.draping_thickness_correction = draping_thickness_correction + self.draping_angle_1_field = draping_angle_1_field + self.draping_angle_2_field = draping_angle_2_field def _create_stub(self) -> modeling_ply_pb2_grpc.ObjectServiceStub: return modeling_ply_pb2_grpc.ObjectServiceStub(self._channel) @@ -120,6 +170,25 @@ def _create_stub(self) -> modeling_ply_pb2_grpc.ObjectServiceStub: active = grpc_data_property("properties.active") global_ply_nr = grpc_data_property("properties.global_ply_nr") + draping = grpc_data_property( + "properties.draping", from_protobuf=draping_type_from_pb, to_protobuf=draping_type_to_pb + ) + draping_seed_point = grpc_data_property( + "properties.draping_seed_point", + from_protobuf=to_tuple_from_1D_array, + to_protobuf=to_1D_double_array, + ) + auto_draping_direction = grpc_data_property("properties.auto_draping_direction") + draping_direction = grpc_data_property( + "properties.draping_direction", + from_protobuf=to_tuple_from_1D_array, + to_protobuf=to_1D_double_array, + ) + draping_mesh_size = grpc_data_property("properties.draping_mesh_size") + draping_thickness_correction = grpc_data_property("properties.draping_thickness_correction") + draping_angle_1_field = grpc_link_property("properties.draping_angle_1_field") + draping_angle_2_field = grpc_link_property("properties.draping_angle_2_field") + selection_rules = define_edge_property_list("properties.selection_rules", LinkedSelectionRule) production_plies = property( diff --git a/src/ansys/acp/core/_tree_objects/oriented_selection_set.py b/src/ansys/acp/core/_tree_objects/oriented_selection_set.py index a89a25c067..dd7667c9d6 100644 --- a/src/ansys/acp/core/_tree_objects/oriented_selection_set.py +++ b/src/ansys/acp/core/_tree_objects/oriented_selection_set.py @@ -24,7 +24,10 @@ from .cylindrical_selection_rule import CylindricalSelectionRule from .element_set import ElementSet from .enums import ( + DrapingMaterialType, RosetteSelectionMethod, + draping_material_type_from_pb, + draping_material_type_to_pb, rosette_selection_method_from_pb, rosette_selection_method_to_pb, status_type_from_pb, @@ -34,6 +37,7 @@ from .rosette import Rosette from .spherical_selection_rule import SphericalSelectionRule from .tube_selection_rule import TubeSelectionRule +from .variable_offset_selection_rule import VariableOffsetSelectionRule __all__ = [ "OrientedSelectionSet", @@ -77,6 +81,26 @@ class OrientedSelectionSet(CreatableTreeObject, IdTreeObject): Selection Method for Rosettes of the Oriented Selection Set. selection_rules : Selection Rules which may limit the extent of the Oriented Selection Set. + draping : + If ``True``, activate draping to adjust the reference directions. + draping_seed_point : + Starting point of the draping algorithm. + auto_draping_direction : + If ``True``, the reference direction of the Oriented Selection Set at + the seed point is used as draping direction. + draping_direction : + Set the primary draping direction for the draping algorithm. Only used if + ``auto_draping_direction`` is ``False``. + draping_mesh_size : + Defines the mesh size for the draping algorithm. If set to ``-1.``, the + mesh size is automatically determined based on the average element size. + draping_material_model : + Chooses between different draping formulations. + draping_ud_coefficient : + Value between ``0`` and ``1`` which determines the amount of deformation + in the transverse direction if the draping material model is set to + :attr:`DrapingMaterialType.UD`. + """ __slots__: Iterable[str] = tuple() @@ -89,10 +113,17 @@ def __init__( self, name: str = "OrientedSelectionSet", element_sets: Sequence[ElementSet] = tuple(), - orientation_point: tuple[float, ...] = (0.0, 0.0, 0.0), - orientation_direction: tuple[float, ...] = (0.0, 0.0, 0.0), + orientation_point: tuple[float, float, float] = (0.0, 0.0, 0.0), + orientation_direction: tuple[float, float, float] = (0.0, 0.0, 0.0), rosettes: Sequence[Rosette] = tuple(), rosette_selection_method: RosetteSelectionMethod = "minimum_angle", + draping: bool = False, + draping_seed_point: tuple[float, float, float] = (0.0, 0.0, 0.0), + auto_draping_direction: bool = True, + draping_direction: tuple[float, float, float] = (0.0, 0.0, 1.0), + draping_mesh_size: float = -1.0, + draping_material_model: DrapingMaterialType = DrapingMaterialType.WOVEN, + draping_ud_coefficient: float = 0.0, ): super().__init__(name=name) self.element_sets = element_sets @@ -100,6 +131,13 @@ def __init__( self.orientation_direction = orientation_direction self.rosettes = rosettes self.rosette_selection_method = RosetteSelectionMethod(rosette_selection_method) + self.draping = draping + self.draping_seed_point = draping_seed_point + self.auto_draping_direction = auto_draping_direction + self.draping_direction = draping_direction + self.draping_mesh_size = draping_mesh_size + self.draping_material_model = DrapingMaterialType(draping_material_model) + self.draping_ud_coefficient = draping_ud_coefficient def _create_stub(self) -> oriented_selection_set_pb2_grpc.ObjectServiceStub: return oriented_selection_set_pb2_grpc.ObjectServiceStub(self._channel) @@ -126,13 +164,34 @@ def _create_stub(self) -> oriented_selection_set_pb2_grpc.ObjectServiceStub: to_protobuf=rosette_selection_method_to_pb, ) + draping = grpc_data_property("properties.draping") + draping_seed_point = grpc_data_property( + "properties.draping_seed_point", + from_protobuf=to_tuple_from_1D_array, + to_protobuf=to_1D_double_array, + ) + auto_draping_direction = grpc_data_property("properties.auto_draping_direction") + draping_direction = grpc_data_property( + "properties.draping_direction", + from_protobuf=to_tuple_from_1D_array, + to_protobuf=to_1D_double_array, + ) + draping_mesh_size = grpc_data_property("properties.draping_mesh_size") + draping_material_model = grpc_data_property( + "properties.draping_material_model", + from_protobuf=draping_material_type_from_pb, + to_protobuf=draping_material_type_to_pb, + ) + draping_ud_coefficient = grpc_data_property("properties.draping_ud_coefficient") + selection_rules = define_polymorphic_linked_object_list( "properties.selection_rules", - ( + allowed_types=( ParallelSelectionRule, CylindricalSelectionRule, SphericalSelectionRule, TubeSelectionRule, + VariableOffsetSelectionRule, BooleanSelectionRule, ), ) diff --git a/src/ansys/acp/core/_tree_objects/variable_offset_selection_rule.py b/src/ansys/acp/core/_tree_objects/variable_offset_selection_rule.py new file mode 100644 index 0000000000..729ef29a26 --- /dev/null +++ b/src/ansys/acp/core/_tree_objects/variable_offset_selection_rule.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +import dataclasses +from typing import Iterable + +import numpy as np +import numpy.typing as npt + +from ansys.api.acp.v0 import ( + variable_offset_selection_rule_pb2, + variable_offset_selection_rule_pb2_grpc, +) + +from .._utils.array_conversions import to_1D_double_array, to_tuple_from_1D_array +from ._grpc_helpers.property_helper import ( + grpc_data_property, + grpc_data_property_read_only, + grpc_link_property, + mark_grpc_properties, +) +from ._mesh_data import ElementalData, NodalData, elemental_data_property, nodal_data_property +from .base import CreatableTreeObject, IdTreeObject +from .edge_set import EdgeSet +from .element_set import ElementSet +from .enums import status_type_from_pb +from .lookup_table_1d_column import LookUpTable1DColumn +from .object_registry import register + +__all__ = [ + "VariableOffsetSelectionRule", + "VariableOffsetSelectionRuleElementalData", + "VariableOffsetSelectionRuleNodalData", +] + + +@dataclasses.dataclass +class VariableOffsetSelectionRuleElementalData(ElementalData): + """Represents elemental data for a VariableOffset Selection Rule.""" + + normal: npt.NDArray[np.float64] + + +@dataclasses.dataclass +class VariableOffsetSelectionRuleNodalData(NodalData): + """Represents nodal data for a VariableOffset Selection Rule.""" + + +@mark_grpc_properties +@register +class VariableOffsetSelectionRule(CreatableTreeObject, IdTreeObject): + """Instantiate a Variable Offset Selection Rule. + + Parameters + ---------- + name : + Name of the Variable Offset Selection Rule. + edge_set : + Defines the edge along which the rule will be applied to. + offsets : + Defines the in-plane offset. Cuts elements which are closer to the edge than this value. + angles : + Defines the angle between the reference surface and the cutting plane. + include_rule_type : + Include or exclude area in rule. Setting this to ``False`` + inverts the selection. + use_offset_correction : + If enabled, then the offset is measured along the surface of the selected Element Set. + element_set : + Defines the surface on which the offset correction is calculated on. + inherit_from_lookup_table : + Specifies whether to inherit the Look-Up Table object properties. + radius_origin : + Origin of the look-up table axis. Only applies if ``inherit_from_lookup_table`` + is ``False``. + radius_direction : + Direction of the look-up table axis. Only applies if ``inherit_from_lookup_table`` + is ``False``. + distance_along_edge : + If ``True``, the look-up locations are evaluated along the edge, instead of along + the axis direction. + """ + + __slots__: Iterable[str] = tuple() + + _COLLECTION_LABEL = "variable_offset_selection_rules" + OBJECT_INFO_TYPE = variable_offset_selection_rule_pb2.ObjectInfo + CREATE_REQUEST_TYPE = variable_offset_selection_rule_pb2.CreateRequest + + def __init__( + self, + name: str = "VariableOffsetSelectionrule", + edge_set: EdgeSet | None = None, + offsets: LookUpTable1DColumn | None = None, + angles: LookUpTable1DColumn | None = None, + include_rule_type: bool = True, + use_offset_correction: bool = False, + element_set: ElementSet | None = None, + inherit_from_lookup_table: bool = True, + radius_origin: tuple[float, float, float] = (0.0, 0.0, 0.0), + radius_direction: tuple[float, float, float] = (1.0, 0.0, 0.0), + distance_along_edge: bool = False, + ): + super().__init__(name=name) + self.edge_set = edge_set + self.offsets = offsets + self.angles = angles + self.include_rule_type = include_rule_type + self.use_offset_correction = use_offset_correction + self.element_set = element_set + self.inherit_from_lookup_table = inherit_from_lookup_table + self.radius_origin = radius_origin + self.radius_direction = radius_direction + self.distance_along_edge = distance_along_edge + + def _create_stub(self) -> variable_offset_selection_rule_pb2_grpc.ObjectServiceStub: + return variable_offset_selection_rule_pb2_grpc.ObjectServiceStub(self._channel) + + status = grpc_data_property_read_only("properties.status", from_protobuf=status_type_from_pb) + + edge_set = grpc_link_property("properties.edge_set") + offsets = grpc_link_property("properties.offsets") + angles = grpc_link_property("properties.angles") + include_rule_type = grpc_data_property("properties.include_rule_type") + use_offset_correction = grpc_data_property("properties.use_offset_correction") + element_set = grpc_link_property("properties.element_set") + inherit_from_lookup_table = grpc_data_property("properties.inherit_from_lookup_table") + radius_origin = grpc_data_property( + "properties.radius_origin", + from_protobuf=to_tuple_from_1D_array, + to_protobuf=to_1D_double_array, + ) + radius_direction = grpc_data_property( + "properties.radius_direction", + from_protobuf=to_tuple_from_1D_array, + to_protobuf=to_1D_double_array, + ) + distance_along_edge = grpc_data_property("properties.distance_along_edge") + + elemental_data = elemental_data_property(VariableOffsetSelectionRuleElementalData) + nodal_data = nodal_data_property(VariableOffsetSelectionRuleNodalData) diff --git a/tests/unittests/test_boolean_selection_rule.py b/tests/unittests/test_boolean_selection_rule.py index 160bb71acd..5d13e82bb8 100644 --- a/tests/unittests/test_boolean_selection_rule.py +++ b/tests/unittests/test_boolean_selection_rule.py @@ -70,6 +70,13 @@ def object_properties(parent_object): parameter_1=1.3, parameter_2=2.9, ), + LinkedSelectionRule( + selection_rule=model.create_variable_offset_selection_rule(), + operation_type=BooleanOperationType.ADD, + template_rule=False, + parameter_1=0.0, + parameter_2=0.0, + ), ], ), ("include_rule_type", False), diff --git a/tests/unittests/test_modeling_ply.py b/tests/unittests/test_modeling_ply.py index ae5bf408f3..fb17c25b95 100644 --- a/tests/unittests/test_modeling_ply.py +++ b/tests/unittests/test_modeling_ply.py @@ -11,7 +11,7 @@ Stackup, SubLaminate, ) -from ansys.acp.core._tree_objects.enums import BooleanOperationType +from ansys.acp.core._tree_objects.enums import BooleanOperationType, DrapingType from .common.linked_object_list_tester import LinkedObjectListTestCase, LinkedObjectListTester from .common.tree_object_tester import NoLockedMixin, ObjectPropertiesToTest, TreeObjectTester @@ -43,6 +43,14 @@ class TestModelingPly(NoLockedMixin, TreeObjectTester): "ply_angle": 0.0, "active": True, "global_ply_nr": AnyThing(), + "draping": DrapingType.NO_DRAPING, + "draping_seed_point": (0.0, 0.0, 0.0), + "auto_draping_direction": True, + "draping_direction": (1.0, 0.0, 0.0), + "draping_mesh_size": -1.0, + "draping_thickness_correction": True, + "draping_angle_1_field": None, + "draping_angle_2_field": None, } CREATE_METHOD_NAME = "create_modeling_ply" @@ -54,6 +62,9 @@ def object_properties(request, parent_model): ply_material = create_method() if not isinstance(ply_material, (Fabric, Stackup, SubLaminate)): raise RuntimeError("Unsupported ply material!") + lookup_table = parent_model.create_lookup_table_1d() + column_1 = lookup_table.create_column() + column_2 = lookup_table.create_column() return ObjectPropertiesToTest( read_write=[ ("oriented_selection_sets", oriented_selection_sets), @@ -92,6 +103,13 @@ def object_properties(request, parent_model): parameter_1=1.3, parameter_2=2.9, ), + LinkedSelectionRule( + selection_rule=parent_model.create_variable_offset_selection_rule(), + operation_type=BooleanOperationType.ADD, + template_rule=False, + parameter_1=0.0, + parameter_2=0.0, + ), LinkedSelectionRule( selection_rule=parent_model.create_boolean_selection_rule(), operation_type=BooleanOperationType.REMOVE, @@ -101,6 +119,13 @@ def object_properties(request, parent_model): ), ], ), + ("draping_seed_point", (0.0, 0.1, 0.2)), + ("auto_draping_direction", False), + ("draping_direction", (0.0, -1.0, 0.0)), + ("draping_mesh_size", 20.0), + ("draping_thickness_correction", False), + ("draping_angle_1_field", column_1), + ("draping_angle_2_field", column_2), ], read_only=[ ("id", "some_id"), diff --git a/tests/unittests/test_oriented_selection_set.py b/tests/unittests/test_oriented_selection_set.py index 4d2ab4f25c..1457b884ab 100644 --- a/tests/unittests/test_oriented_selection_set.py +++ b/tests/unittests/test_oriented_selection_set.py @@ -27,6 +27,13 @@ class TestOrientedSelectionSet(NoLockedMixin, TreeObjectTester): "orientation_point": (0.0, 0.0, 0.0), "orientation_direction": (0.0, 0.0, 0.0), "rosette_selection_method": "minimum_angle", + "draping": False, + "draping_seed_point": (0.0, 0.0, 0.0), + "auto_draping_direction": True, + "draping_direction": (0.0, 0.0, 1.0), + "draping_mesh_size": -1.0, # is only set to the computed value after draping is run + "draping_material_model": "woven", + "draping_ud_coefficient": 0.0, } CREATE_METHOD_NAME = "create_oriented_selection_set" @@ -51,9 +58,17 @@ def object_properties(parent_object): model.create_parallel_selection_rule(), model.create_spherical_selection_rule(), model.create_cylindrical_selection_rule(), + model.create_variable_offset_selection_rule(), model.create_boolean_selection_rule(), ], ), + ("draping", True), + ("draping_seed_point", (0.0, 0.1, 0.0)), + ("auto_draping_direction", False), + ("draping_direction", (1.0, 0.0, 0.0)), + ("draping_mesh_size", 0.1), + ("draping_material_model", "ud"), + ("draping_ud_coefficient", 0.5), ], read_only=[ ("id", "some_id"), diff --git a/tests/unittests/test_variable_offset_selection_rule.py b/tests/unittests/test_variable_offset_selection_rule.py new file mode 100644 index 0000000000..358fc848ca --- /dev/null +++ b/tests/unittests/test_variable_offset_selection_rule.py @@ -0,0 +1,73 @@ +import pytest + +from ansys.acp.core._tree_objects.variable_offset_selection_rule import ( + VariableOffsetSelectionRuleElementalData, + VariableOffsetSelectionRuleNodalData, +) + +from .common.tree_object_tester import NoLockedMixin, ObjectPropertiesToTest, TreeObjectTester + + +@pytest.fixture +def parent_object(load_model_from_tempfile): + with load_model_from_tempfile() as model: + yield model + + +@pytest.fixture +def tree_object(parent_object): + return parent_object.create_variable_offset_selection_rule() + + +class TestVariableOffsetSelectionRule(NoLockedMixin, TreeObjectTester): + COLLECTION_NAME = "variable_offset_selection_rules" + DEFAULT_PROPERTIES = { + "status": "NOTUPTODATE", + "edge_set": None, + "offsets": None, + "angles": None, + "include_rule_type": True, + "use_offset_correction": False, + "element_set": None, + "inherit_from_lookup_table": True, + "radius_origin": (0.0, 0.0, 0.0), + "radius_direction": (1.0, 0.0, 0.0), + "distance_along_edge": False, + } + + CREATE_METHOD_NAME = "create_variable_offset_selection_rule" + + @staticmethod + @pytest.fixture + def object_properties(parent_object): + model = parent_object + edge_set = model.create_edge_set() + lookup_table = model.create_lookup_table_1d() + column_1 = lookup_table.create_column() + column_2 = lookup_table.create_column() + element_set = model.create_element_set() + return ObjectPropertiesToTest( + read_write=[ + ("name", "Variable Offset Selection Rule name"), + ("edge_set", edge_set), + ("offsets", column_1), + ("angles", column_2), + ("include_rule_type", False), + ("use_offset_correction", True), + ("element_set", element_set), + ("inherit_from_lookup_table", False), + ("radius_origin", (0.1, 0.2, 0.3)), + ("radius_direction", (0.4, 0.5, 0.6)), + ("distance_along_edge", True), + ], + read_only=[ + ("id", "some_id"), + ("status", "UPTODATE"), + ], + ) + + +def test_mesh_data(parent_object): + rule = parent_object.create_variable_offset_selection_rule() + assert isinstance(rule.elemental_data, VariableOffsetSelectionRuleElementalData) + assert isinstance(rule.nodal_data, VariableOffsetSelectionRuleNodalData)