예제 #1
0
 def __init__(self, properties=None):
     self.name = "Bottom"
     if properties is None:
         properties = TopBottomRoundedProperties()
     ParamWidget.__init__(self, properties)
     self.widget_list.extend([
         WidgetValue(type=list,
                     name="position",
                     show_name="Position",
                     widget=None,
                     interval_value=[
                         TopBottomRoundedProperties.POSITION_OUTSIDE,
                         TopBottomRoundedProperties.POSITION_INSIDE
                     ]),
         WidgetValue(
             type=float,
             name="height_shift",
             show_name="Height shift",
             widget=None,
             interval_value=[0, 3000.],
             decimals=2,
             step=1,
             parent_name="position",
             parent_value=TopBottomRoundedProperties.POSITION_INSIDE),
         WidgetValue(
             type=float,
             name="radius_outside",
             show_name="Radius oustide",
             widget=None,
             interval_value=[0, 3000.],
             decimals=2,
             step=1,
             parent_name="position",
             parent_value=TopBottomRoundedProperties.POSITION_OUTSIDE)
     ])
예제 #2
0
 def __init__(self, cad_object):
     Part.__init__(self, cad_object)
     self.widget_list.extend([
         WidgetValue(type=list,
                     name="node_type",
                     show_name="Node type",
                     widget=None,
                     interval_value=[
                         MaterialProperties.NODE_NO,
                         MaterialProperties.NODE_SINGLE_SHORT,
                         MaterialProperties.NODE_SINGLE_LONG,
                         MaterialProperties.NODE_DUAL_SHORT
                     ]),
         WidgetValue(type=float,
                     name="node_thickness",
                     show_name="Node thickness",
                     widget=None,
                     interval_value=[0., 30.],
                     decimals=4,
                     step=0.05,
                     parent_name="node_type",
                     parent_value=[
                         MaterialProperties.NODE_SINGLE_SHORT,
                         MaterialProperties.NODE_SINGLE_LONG,
                         MaterialProperties.NODE_DUAL_SHORT
                     ]),
         WidgetValue(type=bool,
                     name="dog_bone",
                     show_name="Dog bone hole",
                     widget=None)
     ])
예제 #3
0
    def __init__(self, cad_face, cad_object, name, t_type):
        BaseTabWidget.__init__(self, cad_face, cad_object, name, t_type)

        self.widget_list.extend([
            WidgetValue(type=float,
                        name="half_tab_ratio",
                        show_name="Half tab ratio",
                        widget=None,
                        interval_value=[0.1, 5.],
                        step=0.1,
                        decimals=2),
            WidgetValue(type=float,
                        name="screw_diameter",
                        show_name="Screw diameter",
                        widget=None,
                        interval_value=[1., 30.],
                        step=1.,
                        decimals=2.),
            WidgetValue(type=float,
                        name="screw_length",
                        show_name="Screw length",
                        widget=None,
                        interval_value=[5., 300.],
                        step=1.,
                        decimals=2.),
            WidgetValue(type=float,
                        name="screw_length_tol",
                        show_name="Screw length tol.",
                        widget=None,
                        interval_value=[0, 300.],
                        step=1.,
                        decimals=2.)
        ])
예제 #4
0
    def __init__(self, cad_face, cad_object, name, t_type):
        BaseTabWidget.__init__(self, cad_face, cad_object, name, t_type)

        self.widget_list = [WidgetValue(type=float, name="tabs_width", show_name="Width of tabs", widget=None,
                                            interval_value=[1., 300.], step=1., decimals=2),
                            WidgetValue(type=bool, name="y_invert", show_name="Invert Y", widget=None),
                            WidgetValue(type=bool, name="dog_bone", show_name="Dog bone hole", widget=None)]
예제 #5
0
 def __init__(self, properties=None):
     self.name = "Top"
     if properties is None:
         properties = TopBottomProperties()
     ParamWidget.__init__(self, properties)
     self.widget_list.extend([
         WidgetValue(type=list,
                     name="position",
                     show_name="Position",
                     widget=None,
                     interval_value=[
                         TopBottomProperties.POSITION_OUTSIDE,
                         TopBottomProperties.POSITION_INSIDE
                     ]),
         WidgetValue(type=float,
                     name="height_shift",
                     show_name="Height shift",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="position",
                     parent_value=TopBottomProperties.POSITION_INSIDE),
         # WidgetValue(type=list, name="top_type", show_name="Top type", widget=None,
         #             interval_value=[TopBottomProperties.TOP_TYPE_NORMAL, TopBottomProperties.TOP_TYPE_COVER],
         #            parent_name="position", parent_value=TopBottomProperties.POSITION_INSIDE),
         WidgetValue(type=float,
                     name="length_outside",
                     show_name="Length outside",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="position",
                     parent_value=TopBottomProperties.POSITION_OUTSIDE),
         WidgetValue(type=float,
                     name="width_outside",
                     show_name="Width outside",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="position",
                     parent_value=TopBottomProperties.POSITION_OUTSIDE)
         #WidgetValue(type=float, name="cover_length_tolerance", show_name="Cover length tol.",
         #            widget=None, interval_value=[0, 3000.], decimals=2, step=1,
         #            parent_name=["position", "top_type"],
         #            parent_value=[TopBottomProperties.POSITION_INSIDE, TopBottomProperties.TOP_TYPE_COVER])
     ])
예제 #6
0
 def __init__(self, cad_face, cad_object, name, t_type):
     self.name = "%s.%s" % (cad_object.Name, name)
     self.description = "%s.%s (%s)" % (cad_object.Name, name, t_type)
     self.real_name = name
     tab_properties = TabProperties(freecad_object=cad_object,
                                    freecad_face=cad_face,
                                    tab_type=t_type,
                                    name=self.name,
                                    real_name=self.real_name,
                                    group_id=self._count())
     ParamWidget.__init__(self, tab_properties)
     self.widget_list.extend([
         WidgetValue(type=float,
                     name="y_length",
                     show_name="Width",
                     widget=None),
         WidgetValue(type=float,
                     name="thickness",
                     show_name="Thickness",
                     widget=None),
         WidgetValue(type=float,
                     name="tabs_number",
                     show_name="Number of tabs",
                     widget=None,
                     interval_value=[1., 300.],
                     step=1.,
                     decimals=0),
         WidgetValue(type=float,
                     name="tabs_width",
                     show_name="Width of tabs",
                     widget=None,
                     interval_value=[1., 300.],
                     step=1.,
                     decimals=2),
         WidgetValue(type=float,
                     name="tabs_shift",
                     show_name="Shift",
                     widget=None,
                     interval_value=[-300, 300.],
                     step=1.,
                     decimals=2),
         WidgetValue(type=float,
                     name="interval_ratio",
                     show_name="Interval ratio",
                     widget=None,
                     interval_value=[0.1, 5.],
                     step=0.1,
                     decimals=2),
         WidgetValue(type=bool,
                     name="dog_bone",
                     show_name="Dog bone hole",
                     widget=None),
         WidgetValue(type=bool,
                     name="tab_dog_bone",
                     show_name="Tab dog bone hole",
                     widget=None)
     ])
예제 #7
0
 def __init__(self, cad_face, cad_object, name, tab_link):
     self.tab_link = tab_link
     self.name = "%s.%s" % (cad_object.Name, name)
     self.real_name = name
     tab_properties = TabProperties(freecad_object=cad_object, freecad_face=cad_face,
                                    tab_type=str(self.tab_link.properties().tab_type),
                                    name=self.name, real_name=self.real_name)
     ParamWidget.__init__(self, tab_properties)
     self.widget_list.extend([WidgetValue(type=bool, name="y_invert", show_name="Invert Y", widget=None)])
예제 #8
0
 def __init__(self, properties=None):
     self.name = "Length and width"
     if properties is None:
         properties = BoxProperties()
     ParamWidget.__init__(self, properties)
     self.widget_list.extend([
         WidgetValue(type=list,
                     name="length_width_priority",
                     show_name="Priority",
                     widget=None,
                     interval_value=[
                         BoxProperties.LENGTH_PRIORTY,
                         BoxProperties.WIDTH_PRIORTY,
                         BoxProperties.CROSS_PRIORTY,
                         BoxProperties.ROUND_PRIORTY
                     ]),
         WidgetValue(type=float,
                     name="length_outside",
                     show_name="Diff. length",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="length_width_priority",
                     parent_value=[BoxProperties.CROSS_PRIORTY]),
         WidgetValue(type=float,
                     name="width_outside",
                     show_name="Diff. width",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="length_width_priority",
                     parent_value=[BoxProperties.CROSS_PRIORTY]),
         WidgetValue(type=float,
                     name="inner_radius",
                     show_name="Width/length",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="length_width_priority",
                     parent_value=[BoxProperties.ROUND_PRIORTY])
     ])
예제 #9
0
 def __init__(self, cad_object):
     self.name = cad_object.Name
     self.label = cad_object.Label
     material = MaterialProperties(freecad_object=cad_object,
                                   type=MaterialProperties.TYPE_LASER_CUT)
     ParamWidget.__init__(self, material)
     self.widget_list.extend([
         WidgetValue(type=str,
                     name="new_name",
                     show_name="New part name",
                     widget=None),
         WidgetValue(type=float,
                     name="thickness",
                     show_name="Thickness",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=0.5),
         WidgetValue(type=float,
                     name="thickness_tolerance",
                     show_name="Thickness tolerance",
                     widget=None,
                     interval_value=[0., 30.],
                     decimals=4,
                     step=0.05),
         WidgetValue(type=float,
                     name="hole_width_tolerance",
                     show_name="Slot width tolerance",
                     widget=None,
                     interval_value=[0., 30.],
                     decimals=4,
                     step=0.05),
         WidgetValue(type=float,
                     name="laser_beam_diameter",
                     show_name="Laser beam diameter",
                     widget=None,
                     interval_value=[0., 30.],
                     decimals=4,
                     step=0.05)
     ])
예제 #10
0
    def __init__(self, cad_face, cad_object, name, t_type):
        BaseTabWidget.__init__(self, cad_face, cad_object, name, t_type)

        self.widget_list = [
            WidgetValue(type=float,
                        name="y_length",
                        show_name="Width",
                        widget=None),
            WidgetValue(type=float,
                        name="thickness",
                        show_name="Thickness",
                        widget=None),
            WidgetValue(type=float,
                        name="tabs_number",
                        show_name="Number of elements",
                        widget=None,
                        interval_value=[2., 300.],
                        step=1.,
                        decimals=0),
            WidgetValue(type=bool,
                        name="y_invert",
                        show_name="Invert Y",
                        widget=None),
            WidgetValue(type=bool,
                        name="dog_bone",
                        show_name="Dog bone hole",
                        widget=None),
            WidgetValue(type=bool,
                        name="tab_dog_bone",
                        show_name="Tab dog bone hole",
                        widget=None)
        ]
예제 #11
0
 def __init__(self, cad_object, part_link):
     self.name = cad_object.Name
     self.label = cad_object.Label
     self.part_link = part_link
     material = MaterialProperties(freecad_object=cad_object,
                                   type=MaterialProperties.TYPE_LASER_CUT)
     ParamWidget.__init__(self, material)
     self.widget_list.extend([
         WidgetValue(type=str,
                     name="new_name",
                     show_name="New part name",
                     widget=None)
     ])
예제 #12
0
 def __init__(self, properties=None):
     self.name = "Dimension"
     if properties is None:
         properties = BoxProperties()
     ParamWidget.__init__(self, properties)
     self.widget_list.extend([
         WidgetValue(type=float,
                     name="length",
                     show_name="Length",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=float,
                     name="width",
                     show_name="Width",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=float,
                     name="height",
                     show_name="Height",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=float,
                     name="thickness",
                     show_name="Thickness",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=bool,
                     name="outside_measure",
                     show_name="Outside measure",
                     widget=None)
     ])
예제 #13
0
 def __init__(self, properties=None):
     self.name = "Dimension"
     if properties is None:
         properties = RoundedBoxProperties()
     ParamWidget.__init__(self, properties)
     self.widget_list.extend([
         WidgetValue(type=float,
                     name="nb_face",
                     show_name="Number of faces",
                     widget=None,
                     interval_value=[5, 15],
                     decimals=0,
                     step=1),
         WidgetValue(type=float,
                     name="inradius",
                     show_name="Inner radius",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=float,
                     name="max_side_length",
                     show_name="Max side length",
                     widget=None),
         WidgetValue(type=float,
                     name="side_length",
                     show_name="Side length",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=float,
                     name="height",
                     show_name="Side height",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=float,
                     name="thickness",
                     show_name="Thickness",
                     widget=None,
                     interval_value=[0.5, 3000.],
                     decimals=2,
                     step=1),
         WidgetValue(type=float,
                     name="cut",
                     show_name="Nb cut",
                     widget=None,
                     interval_value=[0, 1000],
                     decimals=0,
                     step=1)
     ])