morphopt 4.0.3__tar.gz → 4.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. {morphopt-4.0.3 → morphopt-4.0.4}/PKG-INFO +2 -1
  2. {morphopt-4.0.3 → morphopt-4.0.4}/pyproject.toml +2 -1
  3. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/baseparam.py +6 -2
  4. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/parts/cad_part.py +2 -2
  5. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/boundary_part.py +16 -5
  6. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/__init__.py +2 -0
  7. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/base_surface.py +18 -0
  8. morphopt-4.0.4/src/morphopt/shapeopt/surfaces/brep_surface.py +695 -0
  9. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/bsp_surface.py +1 -0
  10. morphopt-4.0.4/src/morphopt/shapeopt/surfaces/nurbs_face.py +414 -0
  11. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/__init__.py +1 -0
  12. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/cad.py +2 -1
  13. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/fields.py +1 -1
  14. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/finite_element.py +4 -1
  15. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/part_sets.py +18 -3
  16. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/results.py +3 -1
  17. morphopt-4.0.4/src/morphopt/ui/application/surface_export.py +105 -0
  18. morphopt-4.0.4/src/morphopt/ui/application/validation.py +638 -0
  19. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/codegen/assets.py +8 -6
  20. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/codegen/generator.py +4 -1
  21. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/locales/en-US.json +43 -3
  22. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/locales/zh-CN.json +43 -3
  23. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/surfaces.py +6 -2
  24. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/observe_panel.py +22 -0
  25. morphopt-4.0.4/src/morphopt/ui/surface_export_worker.py +22 -0
  26. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/palette.py +2 -0
  27. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/themes/dark.py +2 -0
  28. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/themes/light.py +2 -0
  29. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/visualization/geometry.py +3 -3
  30. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/asset_browser.py +1 -1
  31. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/definition_actions.py +4 -4
  32. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/model_tree.py +103 -31
  33. morphopt-4.0.4/src/morphopt/ui/widgets/surface_export.py +163 -0
  34. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/workbench.py +1 -0
  35. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt.egg-info/PKG-INFO +2 -1
  36. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt.egg-info/SOURCES.txt +5 -0
  37. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt.egg-info/requires.txt +1 -0
  38. morphopt-4.0.3/src/morphopt/shapeopt/surfaces/brep_surface.py +0 -155
  39. {morphopt-4.0.3 → morphopt-4.0.4}/README.md +0 -0
  40. {morphopt-4.0.3 → morphopt-4.0.4}/setup.cfg +0 -0
  41. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/__init__.py +0 -0
  42. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/codesign/__init__.py +0 -0
  43. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/codesign/constraints.py +0 -0
  44. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/codesign/offset_boundary_part.py +0 -0
  45. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/codesign/update_offset_boundary_part.py +0 -0
  46. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/constants.py +0 -0
  47. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/opt_runner.py +0 -0
  48. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/__init__.py +0 -0
  49. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/controller.py +0 -0
  50. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/history.py +0 -0
  51. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/__init__.py +0 -0
  52. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/base_model_component.py +0 -0
  53. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/__init__.py +0 -0
  54. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/base_component.py +0 -0
  55. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/body_force.py +0 -0
  56. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/boundary_condition.py +0 -0
  57. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/contact.py +0 -0
  58. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/couple.py +0 -0
  59. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/point_load.py +0 -0
  60. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/pressure.py +0 -0
  61. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/reference_point.py +0 -0
  62. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/fea/spring.py +0 -0
  63. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/feaparams.py +0 -0
  64. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/geometry.py +0 -0
  65. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/materials/__init__.py +0 -0
  66. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/materials/base_material.py +0 -0
  67. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/materials/homogeneous_material.py +0 -0
  68. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/materials/models.py +0 -0
  69. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/materialsparams.py +0 -0
  70. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/params.py +0 -0
  71. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/parts/__init__.py +0 -0
  72. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/parts/base_part.py +0 -0
  73. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/parts/box_part.py +0 -0
  74. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/modelparams/parts/inp_part.py +0 -0
  75. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/objfunc.py +0 -0
  76. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/protocal.py +0 -0
  77. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/quadrature.py +0 -0
  78. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/solver.py +0 -0
  79. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/optcore/updaters.py +0 -0
  80. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/postprocess/__init__.py +0 -0
  81. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/postprocess/exporters.py +0 -0
  82. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/postprocess/fields.py +0 -0
  83. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/postprocess/native.py +0 -0
  84. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/__init__.py +0 -0
  85. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/objectivefuncs/__init__.py +0 -0
  86. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/objectivefuncs/basefuncs.py +0 -0
  87. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/objectivefuncs/boundarys.py +0 -0
  88. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/objectivefuncs/distancesurface.py +0 -0
  89. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/objectivefuncs/shapederivative.py +0 -0
  90. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/objectivefuncs/surfacefairness.py +0 -0
  91. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/objectivefuncs/volumemaximization.py +0 -0
  92. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/base_constraints.py +0 -0
  93. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/bsp_constraints.py +0 -0
  94. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/cpgeo_constraints.py +0 -0
  95. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/cpgeo_surface.py +0 -0
  96. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/surfaces/mesh_surface.py +0 -0
  97. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/shapeopt/update_boundary_part.py +0 -0
  98. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/__init__.py +0 -0
  99. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/objectivefuncs/__init__.py +0 -0
  100. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/objectivefuncs/basefuncs.py +0 -0
  101. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/objectivefuncs/boundarys.py +0 -0
  102. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/objectivefuncs/densityfield.py +0 -0
  103. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/objectivefuncs/sensitivity.py +0 -0
  104. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/objectivefuncs/volfrac.py +0 -0
  105. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/simpmaterial.py +0 -0
  106. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/simp/update_simpmaterial.py +0 -0
  107. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/taskoptmization.py +0 -0
  108. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/__main__.py +0 -0
  109. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/app.py +0 -0
  110. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/__init__.py +0 -0
  111. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/completion.py +0 -0
  112. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/definitions.py +0 -0
  113. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/devices.py +0 -0
  114. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/edit_history.py +0 -0
  115. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/editing.py +0 -0
  116. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/editor_routing.py +0 -0
  117. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/expressions.py +0 -0
  118. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/load_cases.py +0 -0
  119. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/quickstart.py +0 -0
  120. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/result_fields.py +0 -0
  121. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/runs.py +0 -0
  122. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/updaters.py +0 -0
  123. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application/values.py +0 -0
  124. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/application_icon.py +0 -0
  125. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/assets/morphopt.svg +0 -0
  126. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/cad_worker.py +0 -0
  127. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/codegen/__init__.py +0 -0
  128. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/codegen/custom_classes.py +0 -0
  129. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/codegen/workspace.py +0 -0
  130. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/fea_worker.py +0 -0
  131. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/i18n.py +0 -0
  132. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/launcher.py +0 -0
  133. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/mainwindow.py +0 -0
  134. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/__init__.py +0 -0
  135. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/base_nodes.py +0 -0
  136. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/chamberlayout.py +0 -0
  137. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/configuration.py +0 -0
  138. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/fields.py +0 -0
  139. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/loaders.py +0 -0
  140. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/material_models.py +0 -0
  141. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/__init__.py +0 -0
  142. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/cad.py +0 -0
  143. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/custom_code.py +0 -0
  144. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/loads.py +0 -0
  145. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/materials.py +0 -0
  146. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/objectives.py +0 -0
  147. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/parts.py +0 -0
  148. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/penalties.py +0 -0
  149. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/structural.py +0 -0
  150. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/node_types/symmetry.py +0 -0
  151. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/problem.py +0 -0
  152. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/model/registry.py +0 -0
  153. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/presentation/__init__.py +0 -0
  154. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/presentation/edit_history.py +0 -0
  155. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/presentation/history.py +0 -0
  156. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/presentation/labels.py +0 -0
  157. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/presentation/navigation.py +0 -0
  158. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/refresh.py +0 -0
  159. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/schemes/__init__.py +0 -0
  160. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/schemes/base.py +0 -0
  161. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/schemes/snippets.py +0 -0
  162. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/__init__.py +0 -0
  163. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/manager.py +0 -0
  164. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/styles/__init__.py +0 -0
  165. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/styles/base.qss +0 -0
  166. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/styles/controls.qss +0 -0
  167. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/styles/inputs.qss +0 -0
  168. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/stylesheet.py +0 -0
  169. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/theme/themes/__init__.py +0 -0
  170. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/visualization/__init__.py +0 -0
  171. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/visualization/assets.py +0 -0
  172. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/visualization/loads.py +0 -0
  173. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/visualization/scene.py +0 -0
  174. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/__init__.py +0 -0
  175. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/case_deletion.py +0 -0
  176. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/codeeditor.py +0 -0
  177. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/collection_controls.py +0 -0
  178. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/controller_editor.py +0 -0
  179. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/custom_classes.py +0 -0
  180. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/definition_manager.py +0 -0
  181. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/edit_history.py +0 -0
  182. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/editor.py +0 -0
  183. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/editor_pages.py +0 -0
  184. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/elided_label.py +0 -0
  185. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/file_dialogs.py +0 -0
  186. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/finite_element.py +0 -0
  187. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/helper_editor.py +0 -0
  188. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/history_dialogs.py +0 -0
  189. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/language_selector.py +0 -0
  190. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/load_cases.py +0 -0
  191. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/objective_editor.py +0 -0
  192. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/observation_pages.py +0 -0
  193. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/param_form.py +0 -0
  194. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/plot_style.py +0 -0
  195. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/preview_renderer.py +0 -0
  196. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/quickstart.py +0 -0
  197. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/result_path.py +0 -0
  198. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/run_dialogs.py +0 -0
  199. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/solver_editor.py +0 -0
  200. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/source_view.py +0 -0
  201. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/template_insert_dialog.py +0 -0
  202. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/theme_selector.py +0 -0
  203. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/updater_editor.py +0 -0
  204. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/values.py +0 -0
  205. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/viewer.py +0 -0
  206. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/ui/widgets/workspace_objective.py +0 -0
  207. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/utils/__init__.py +0 -0
  208. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/utils/gradient_check.py +0 -0
  209. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt/utils/history_read.py +0 -0
  210. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt.egg-info/dependency_links.txt +0 -0
  211. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt.egg-info/entry_points.txt +0 -0
  212. {morphopt-4.0.3 → morphopt-4.0.4}/src/morphopt.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: morphopt
3
- Version: 4.0.3
3
+ Version: 4.0.4
4
4
  Summary: A morphing optimization framework using PyTorch and torchfea.
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -13,6 +13,7 @@ Requires-Dist: pyvista>=0.47.1
13
13
  Requires-Dist: pyvistaqt>=0.11.3
14
14
  Requires-Dist: vtk>=9.6.1
15
15
  Requires-Dist: gmsh>=4.15.0
16
+ Requires-Dist: cadquery-ocp>=8.0.1.1.0
16
17
  Requires-Dist: tabulate>=0.9.0
17
18
  Requires-Dist: imageio>=2.37.3
18
19
  Requires-Dist: bspmap>=1.0.3
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "morphopt"
3
- version = "4.0.3"
3
+ version = "4.0.4"
4
4
  description = "A morphing optimization framework using PyTorch and torchfea."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -14,6 +14,7 @@ dependencies = [
14
14
  "pyvistaqt>=0.11.3",
15
15
  "vtk>=9.6.1",
16
16
  "gmsh>=4.15.0",
17
+ "cadquery-ocp>=8.0.1.1.0",
17
18
  "tabulate>=0.9.0",
18
19
  "imageio>=2.37.3",
19
20
  "bspmap>=1.0.3",
@@ -67,13 +67,17 @@ class BaseParams(
67
67
  def define_interface(self) -> None:
68
68
  """Declare the interfaces owned by this parameter collection."""
69
69
 
70
- def initialize(self, *args, **kwargs) -> None:
71
- """Initialize every registered interface."""
70
+ def initialize_interfaces(self, *args: object, **kwargs: object) -> None:
71
+ """Declare and initialize interfaces independently of analysis tasks."""
72
72
  if not self.interfaces:
73
73
  self.define_interface()
74
74
  for interface in self.interfaces.values():
75
75
  interface.initialize(*args, **kwargs)
76
76
 
77
+ def initialize(self, *args: object, **kwargs: object) -> None:
78
+ """Initialize every registered interface."""
79
+ self.initialize_interfaces(*args, **kwargs)
80
+
77
81
  def reinitialize(self, iteration: int, *args, **kwargs) -> None:
78
82
  """Re-initialize every registered interface."""
79
83
  for interface in self.interfaces.values():
@@ -333,8 +333,8 @@ class CADPart(BasePart):
333
333
  face_indices=face_indices, face_map=face_map,
334
334
  )
335
335
  torchfea_cad.export_step([CADPart._Operation("shell", action)], str(path))
336
- path.with_suffix(".faces.json").write_text(
337
- json.dumps(face_map, indent=2), encoding="utf-8",
336
+ path.with_suffix(".brep.json").write_text(
337
+ json.dumps({"face_map": face_map}, indent=2), encoding="utf-8",
338
338
  )
339
339
 
340
340
  def to_boundary_part(
@@ -261,6 +261,8 @@ class BoundaryPart(CADPart, ProtocalUpdatable):
261
261
  [(np.unique(np.concatenate(ids)), side) for side, ids in sides.items()],
262
262
  )
263
263
  part.add_node_set(name, np.unique(np.concatenate(nodes)))
264
+ for index, surface in enumerate(self.surfaceinterfaces):
265
+ surface.define_mesh_sets(part, f"surface_{index}")
264
266
  exterior = self.exterior_surface or "extern"
265
267
  if exterior not in part.surfaces:
266
268
  part.add_surface_set(exterior, part.surfaces["extern"])
@@ -273,7 +275,7 @@ class BoundaryPart(CADPart, ProtocalUpdatable):
273
275
  for name, indices in self.surfaceinterfaces[0].get_node_sets(nodes[outer_nodes]).items():
274
276
  part.add_node_set(f"surface_0_{name}", outer_nodes[indices])
275
277
  for index, surface in enumerate(self.surfaceinterfaces):
276
- if not surface.num_variables:
278
+ if not surface.num_variables or surface.uses_facewise_binding:
277
279
  continue
278
280
  indices = np.sort(part.set_nodes[f"surface_{index}_All"])
279
281
  surface.match_coordinates(indices, nodes[indices])
@@ -283,7 +285,10 @@ class BoundaryPart(CADPart, ProtocalUpdatable):
283
285
  dtype=part.nodes.dtype,
284
286
  )
285
287
  part.nodes[surface.surf_node_idx] = surface.map(uv)
286
- return super().postprocess_mesh(part)
288
+ part = super().postprocess_mesh(part)
289
+ for surface in self.surfaceinterfaces:
290
+ surface.bind_mesh(part)
291
+ return part
287
292
 
288
293
  def export_data(self, dirpath: str, pools: Pool | None = None) -> None:
289
294
  """Export every surface to ``__surface-<index>.stp|stl``."""
@@ -441,6 +446,7 @@ class BoundaryPart(CADPart, ProtocalUpdatable):
441
446
 
442
447
  values = torch.as_tensor(design_sensitivity_vars).reshape(-1)
443
448
  offset = 0
449
+ facewise: list[BaseSurface] = []
444
450
  for surface in self.surfaceinterfaces:
445
451
  size = surface.num_variables
446
452
  if not size:
@@ -450,9 +456,10 @@ class BoundaryPart(CADPart, ProtocalUpdatable):
450
456
  if not surface.is_updatable:
451
457
  continue
452
458
  surface.set_surface_parameters(parameters)
453
-
454
- node_update = surface.map(torch.from_numpy(surface.surf_node_uv))
455
- nodes_new[surface.surf_node_idx] = node_update
459
+ indices, node_update = surface.map_design_nodes()
460
+ nodes_new[indices] = node_update
461
+ if surface.uses_facewise_binding:
462
+ facewise.append(surface)
456
463
 
457
464
  if self.mesh_order == 2:
458
465
  nodes_new[part.mid_pt_idxmap_torch[:, 2]] = (
@@ -460,6 +467,10 @@ class BoundaryPart(CADPart, ProtocalUpdatable):
460
467
  + nodes_new[part.mid_pt_idxmap_torch[:, 1]]
461
468
  ) / 2
462
469
 
470
+ for surface in facewise:
471
+ indices, node_update = surface.map_design_nodes()
472
+ nodes_new[indices] = node_update
473
+
463
474
  part.nodes = nodes_new
464
475
 
465
476
  # ---------------------------------------------------------------- io/plot
@@ -10,6 +10,7 @@ from .cpgeo_constraints import CPGEOSurfaceRelationConstraint
10
10
  from .bsp_surface import BspSurface
11
11
  from .cpgeo_surface import CPGEOSurface
12
12
  from .brep_surface import BREPSurface
13
+ from .nurbs_face import NURBSFace
13
14
  from .mesh_surface import MeshSurface
14
15
 
15
16
  __all__ = [
@@ -23,4 +24,5 @@ __all__ = [
23
24
  "BspSurface",
24
25
  "CPGEOSurface",
25
26
  "BREPSurface",
27
+ "NURBSFace",
26
28
  ]
@@ -17,6 +17,7 @@ from .base_constraints import BaseSurfaceConstraints
17
17
  if TYPE_CHECKING:
18
18
  from multiprocessing.pool import Pool
19
19
 
20
+ import torchfea
20
21
  from torchfea.cad.builder import OCCBuilder
21
22
 
22
23
  from ...optcore.modelparams.parts.cad_part import CADPart
@@ -155,6 +156,23 @@ class BaseSurface(BaseModelComponent):
155
156
  """Return surface-specific node sets as indices into ``nodes``."""
156
157
  return {}
157
158
 
159
+ def define_mesh_sets(self, part: torchfea.Part, prefix: str) -> None:
160
+ """Add topology-owned sets after the Part's mesh has been extracted."""
161
+
162
+ def bind_mesh(self, part: torchfea.Part) -> None:
163
+ """Bind surface parameters after element-order processing is complete."""
164
+
165
+ @property
166
+ def uses_facewise_binding(self) -> bool:
167
+ """Whether a surface has multiple independent parameter domains."""
168
+ return False
169
+
170
+ def map_design_nodes(self) -> tuple[np.ndarray, torch.Tensor]:
171
+ """Return bound FE indices and differentiable updated coordinates."""
172
+ parameters = self.get_surface_parameters()
173
+ uv = torch.as_tensor(self.surf_node_uv, dtype=parameters.dtype, device=parameters.device)
174
+ return self.surf_node_idx, self.map(uv)
175
+
158
176
  def set_surface_parameters(self, x: torch.Tensor) -> None:
159
177
  """
160
178
  Set the design variables of the surface.