def makeMeshBoundaryLayer(doc, base_mesh, name="MeshBoundaryLayer"):
    '''makeMeshBoundaryLayer(document, base_mesh, [name]): creates a FEM mesh BoundaryLayer object to define boundary layer properties'''
    obj = doc.addObject("Fem::FeaturePython", name)
    from femobjects import _FemMeshBoundaryLayer
    _FemMeshBoundaryLayer._FemMeshBoundaryLayer(obj)
    # obj.BaseMesh = base_mesh
    # App::PropertyLinkList does not support append, we will use a temporary list to append the mesh BoundaryLayer obj. to the list
    tmplist = base_mesh.MeshBoundaryLayerList
    tmplist.append(obj)
    base_mesh.MeshBoundaryLayerList = tmplist
    if FreeCAD.GuiUp:
        from femguiobjects import _ViewProviderFemMeshBoundaryLayer
        _ViewProviderFemMeshBoundaryLayer._ViewProviderFemMeshBoundaryLayer(obj.ViewObject)
    return obj
Beispiel #2
0
def makeMeshBoundaryLayer(doc, base_mesh, name="MeshBoundaryLayer"):
    '''makeMeshBoundaryLayer(document, base_mesh, [name]): creates a FEM mesh BoundaryLayer object to define boundary layer properties'''
    obj = doc.addObject("Fem::FeaturePython", name)
    from femobjects import _FemMeshBoundaryLayer
    _FemMeshBoundaryLayer._FemMeshBoundaryLayer(obj)
    # obj.BaseMesh = base_mesh
    # App::PropertyLinkList does not support append, we will use a temporary list to append the mesh BoundaryLayer obj. to the list
    tmplist = base_mesh.MeshBoundaryLayerList
    tmplist.append(obj)
    base_mesh.MeshBoundaryLayerList = tmplist
    if FreeCAD.GuiUp:
        from femguiobjects import _ViewProviderFemMeshBoundaryLayer
        _ViewProviderFemMeshBoundaryLayer._ViewProviderFemMeshBoundaryLayer(
            obj.ViewObject)
    return obj