def makeConstraintSelfWeight(doc, name="ConstraintSelfWeight"):
    '''makeConstraintSelfWeight(document, [name]): creates an self weight object to define a gravity load'''
    obj = doc.addObject("Fem::ConstraintPython", name)
    from femobjects import _FemConstraintSelfWeight
    _FemConstraintSelfWeight._FemConstraintSelfWeight(obj)
    if FreeCAD.GuiUp:
        from femguiobjects import _ViewProviderFemConstraintSelfWeight
        _ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(obj.ViewObject)
    return obj
示例#2
0
def makeConstraintSelfWeight(doc, name="ConstraintSelfWeight"):
    '''makeConstraintSelfWeight(document, [name]): creates an self weight object to define a gravity load'''
    obj = doc.addObject("Fem::ConstraintPython", name)
    from femobjects import _FemConstraintSelfWeight
    _FemConstraintSelfWeight._FemConstraintSelfWeight(obj)
    if FreeCAD.GuiUp:
        from femguiobjects import _ViewProviderFemConstraintSelfWeight
        _ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(
            obj.ViewObject)
    return obj