Exemple #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)
     ])
Exemple #2
0
    def __init__(self, tab_properties):
        BaseTabWidget.__init__(self, tab_properties)

        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.)
        ])
Exemple #3
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])
     ])
Exemple #4
0
 def __init__(self, tab_properties):
     self.name = tab_properties.face_name
     self.description = tab_properties.description  # a supprimer ?
     self.tab_name = tab_properties.tab_name
     self.obj_name = tab_properties.freecad_obj_name
     self.link_name = None
     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)
     ])
Exemple #5
0
    def __init__(self, tab_properties):
        BaseTabWidget.__init__(self, tab_properties)

        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)
        ]
Exemple #6
0
    def __init__(self, tab_properties):
        BaseTabWidget.__init__(self, tab_properties)

        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)
        ]
Exemple #7
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)
     ])
Exemple #8
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)
     ])
Exemple #9
0
    def __init__(self, tab_properties):
        self.name = tab_properties.face_name
        self.description = tab_properties.description
        self.tab_name = tab_properties.tab_name
        self.obj_name = tab_properties.freecad_obj_name
        self.link_name = tab_properties.link_name

        ParamWidget.__init__(self, tab_properties)
        self.widget_list.extend([
            WidgetValue(type=bool,
                        name="y_invert",
                        show_name="Invert Y",
                        widget=None)
        ])
Exemple #10
0
    def __init__(self, hingeProperties):
        self.name = hingeProperties.name
        ParamWidget.__init__(self, hingeProperties)

        self.widget_list.extend([
            WidgetValue(type=float,
                        name="arc_inner_radius",
                        show_name="Arc radius (inner)",
                        widget=None),
            WidgetValue(type=float,
                        name="arc_outer_radius",
                        show_name="Arc radius (outer)",
                        widget=None),
            WidgetValue(type=float,
                        name="arc_length",
                        show_name="Arc length",
                        widget=None),
            WidgetValue(type=bool,
                        name="reversed_angle",
                        show_name="Reverse Angle",
                        widget=None),
            WidgetValue(type=float,
                        name="deg_angle",
                        show_name="Angle (degree)",
                        widget=None),
            WidgetValue(type=float,
                        name="min_links_nb",
                        show_name="Min. link",
                        widget=None),
            WidgetValue(type=float,
                        name="nb_link",
                        show_name="Number link",
                        widget=None,
                        interval_value=[2, 300],
                        decimals=0,
                        step=1)
        ])
Exemple #11
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="width_shift",
                     show_name="Width shift",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="length_width_priority",
                     parent_value=[BoxProperties.LENGTH_PRIORTY]),
         WidgetValue(type=float,
                     name="length_shift",
                     show_name="Length shift",
                     widget=None,
                     interval_value=[0, 3000.],
                     decimals=2,
                     step=1,
                     parent_name="length_width_priority",
                     parent_value=[BoxProperties.WIDTH_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])
     ])
Exemple #12
0
 def __init__(self, global_properties):
     self.name = global_properties.name
     self.label = global_properties.label
     ParamWidget.__init__(self, global_properties)
     self.widget_list.extend([
         WidgetValue(type=float,
                     name="thickness",
                     show_name="Thickness",
                     widget=None),
         WidgetValue(type=str,
                     name="new_name",
                     show_name="Flat part name",
                     widget=None),
         WidgetValue(
             type=list,
             name="hinge_type",
             show_name="Type",
             widget=None,
             interval_value=[
                 GlobalLivingMaterialProperties.HINGE_TYPE_ALTERNATE_DOUBLE
             ]),
         WidgetValue(
             type=float,
             name="alternate_nb_hinge",
             show_name="Nb hinge per column",
             widget=None,
             interval_value=[1, 30],
             decimals=0,
             step=1,
             parent_name="hinge_type",
             parent_value=[
                 GlobalLivingMaterialProperties.HINGE_TYPE_ALTERNATE_DOUBLE
             ]),
         WidgetValue(
             type=float,
             name="occupancy_ratio",
             show_name="Hinges occupancy ratio",
             widget=None,
             interval_value=[0.1, 1.],
             decimals=4,
             step=0.05,
             parent_name="hinge_type",
             parent_value=[
                 GlobalLivingMaterialProperties.HINGE_TYPE_ALTERNATE_DOUBLE
             ]),
         WidgetValue(type=float,
                     name="link_clearance",
                     show_name="Clearance width",
                     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),
         WidgetValue(type=bool,
                     name="generate_solid",
                     show_name="Generate solid",
                     widget=None)
     ])