diff --git a/docs/nodes/CAD/stright_skeleton_2d.rst b/docs/nodes/CAD/stright_skeleton_2d.rst index bcbf02b4bf..501fb03413 100644 --- a/docs/nodes/CAD/stright_skeleton_2d.rst +++ b/docs/nodes/CAD/stright_skeleton_2d.rst @@ -4,6 +4,8 @@ Stright Skeleton 2d .. image:: https://github.com/user-attachments/assets/2a141705-62e6-489b-a4be-9333df8c7951 :target: https://github.com/user-attachments/assets/2a141705-62e6-489b-a4be-9333df8c7951 +!!! **"Exclude height" parameter was renamed into "Restrict Height" !!! Images will be updated later...** + Functionality ------------- @@ -39,7 +41,7 @@ Inputs .. image:: https://github.com/user-attachments/assets/3ce5a747-9b8d-4aef-94fc-9e268425e6a6 :target: https://github.com/user-attachments/assets/3ce5a747-9b8d-4aef-94fc-9e268425e6a6 -- **Taper Angle** - Angle between plane and Face that this algorithm will build. +- **Taper Angle** - Angle between plane and Face that this algorithm will build. Valid range is 0 < Taper Angle <180 Degrees; 0 and 180 are invelid angles. Also 90 degrees is invalid param if "Restrict Height" is off. .. image:: https://github.com/user-attachments/assets/666c3a16-f124-4230-906b-8b4ea2cd699c :target: https://github.com/user-attachments/assets/666c3a16-f124-4230-906b-8b4ea2cd699c @@ -120,7 +122,7 @@ Parameters .. image:: https://github.com/user-attachments/assets/bd119bb8-ad08-4983-be67-d97c20ad8bb3 :target: https://github.com/user-attachments/assets/bd119bb8-ad08-4983-be67-d97c20ad8bb3 - - **Exclude Height** - If you want to see objects without height limits just turn it on. All objects will be recalulated without heights limits. + - **Restrict Height** (old name is "Exclude Height")- If you want to see objects without height limits just turn it off. All objects will be recalulated without heights limits (in the input field or socket). .. raw:: html diff --git a/nodes/CAD/stright_skeleton_2d.py b/nodes/CAD/stright_skeleton_2d.py index becc6b375f..cc8b394efe 100644 --- a/nodes/CAD/stright_skeleton_2d.py +++ b/nodes/CAD/stright_skeleton_2d.py @@ -215,12 +215,13 @@ def wrapper_tracked_ui_draw_op(self, layout_element, operator_idname, **keywords ss_height: FloatProperty( default=1.0, name="Height", update=updateNode, - description = "Max height", + description = "Max height. Disabled if (socket connected or Restrict height is off)", ) # type: ignore + # !!! Inverted in UI. Named as in a CGAL library exclude_height: BoolProperty( - name="Exclude height", - description='Exclude height from calculations. (If you do not want change height to unlimit height)', + name="Restrict height", + description='Restrict height of object. (If no then all heights wil bu unlimited height)', default=False, update=updateNode) # type: ignore only_tests_for_valid: BoolProperty( @@ -325,9 +326,25 @@ def draw_angles_mode_in_socket(self, socket, context, layout): # Временно отключено #grid.prop(self, 'angles_mode', expand=True, icon_only=True) + def draw_ss_height_in_socket(self, socket, context, layout): + grid = layout.grid_flow(row_major=False, columns=3, align=True) + col = grid.column() + col.prop(self, 'ss_height') + if socket.is_linked==True: + col.enabled = False + else: + if self.exclude_height==True: + col.enabled = False + else: + col.enabled = True + pass + #col.enabled = True + pass + pass + def draw_buttons(self, context, layout): col = layout.column() - col.prop(self, 'exclude_height') + col.prop(self, 'exclude_height', invert_checkbox=True) col.prop(self, 'only_tests_for_valid') col.prop(self, 'verbose_messages_while_process') #col.row().prop(self, 'join_mode', expand=True) @@ -358,6 +375,7 @@ def sv_init(self, context): self.inputs['ss_angles'].label = 'Angles' self.inputs['ss_angles'].custom_draw = 'draw_angles_mode_in_socket' self.inputs['ss_height'].label = 'Height' + self.inputs['ss_height'].custom_draw = 'draw_ss_height_in_socket' self.inputs['objects_mask'].custom_draw = 'draw_objects_mask_in_socket' self.inputs['file_name'].label = 'File Name' self.inputs['file_name'].hide = True