Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEM: constraint tie, implement object and ccx writer
- Loading branch information
1 parent
66e8e29
commit 0bd0364
Showing
9 changed files
with
270 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
src/Mod/Fem/femguiobjects/_ViewProviderFemConstraintTie.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# *************************************************************************** | ||
# * * | ||
# * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> * | ||
# * * | ||
# * This program is free software; you can redistribute it and/or modify * | ||
# * it under the terms of the GNU Lesser General Public License (LGPL) * | ||
# * as published by the Free Software Foundation; either version 2 of * | ||
# * the License, or (at your option) any later version. * | ||
# * for detail see the LICENCE text file. * | ||
# * * | ||
# * This program is distributed in the hope that it will be useful, * | ||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
# * GNU Library General Public License for more details. * | ||
# * * | ||
# * You should have received a copy of the GNU Library General Public * | ||
# * License along with this program; if not, write to the Free Software * | ||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * | ||
# * USA * | ||
# * * | ||
# *************************************************************************** | ||
|
||
__title__ = "FreeCAD FEM constraint tie ViewProvider for the document object" | ||
__author__ = "Bernd Hahnebach" | ||
__url__ = "http://www.freecadweb.org" | ||
|
||
## @package ViewProviderFemConstraintTie | ||
# \ingroup FEM | ||
# \brief FreeCAD FEM _ViewProviderFemConstraintTie | ||
|
||
import FreeCAD | ||
import FreeCADGui | ||
import FemGui # needed to display the icons in TreeView | ||
|
||
# for the panel | ||
from PySide import QtCore | ||
from . import FemSelectionWidgets | ||
|
||
False if FemGui.__name__ else True # flake8, dummy FemGui usage | ||
|
||
|
||
class _ViewProviderFemConstraintTie: | ||
"A View Provider for the FemConstraintTie object" | ||
|
||
def __init__(self, vobj): | ||
vobj.Proxy = self | ||
|
||
def getIcon(self): | ||
return ":/icons/fem-constraint-tie.svg" | ||
|
||
def attach(self, vobj): | ||
from pivy import coin | ||
self.ViewObject = vobj | ||
self.Object = vobj.Object | ||
self.standard = coin.SoGroup() | ||
vobj.addDisplayMode(self.standard, "Default") | ||
|
||
def getDisplayModes(self, obj): | ||
return ["Default"] | ||
|
||
def getDefaultDisplayMode(self): | ||
return "Default" | ||
|
||
def updateData(self, obj, prop): | ||
return | ||
|
||
def onChanged(self, vobj, prop): | ||
return | ||
|
||
def setEdit(self, vobj, mode=0): | ||
return True | ||
|
||
def unsetEdit(self, vobj, mode=0): | ||
return True | ||
|
||
def __getstate__(self): | ||
return None | ||
|
||
def __setstate__(self, state): | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# *************************************************************************** | ||
# * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> * | ||
# * * | ||
# * This program is free software; you can redistribute it and/or modify * | ||
# * it under the terms of the GNU Lesser General Public License (LGPL) * | ||
# * as published by the Free Software Foundation; either version 2 of * | ||
# * the License, or (at your option) any later version. * | ||
# * for detail see the LICENCE text file. * | ||
# * * | ||
# * This program is distributed in the hope that it will be useful, * | ||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
# * GNU Library General Public License for more details. * | ||
# * * | ||
# * You should have received a copy of the GNU Library General Public * | ||
# * License along with this program; if not, write to the Free Software * | ||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * | ||
# * USA * | ||
# * * | ||
# *************************************************************************** | ||
|
||
__title__ = "FreeCAD FEM constraint tie document object" | ||
__author__ = "Bernd Hahnebach" | ||
__url__ = "https://www.freecadweb.org" | ||
|
||
## @package FemConstraintTie | ||
# \ingroup FEM | ||
# \brief FreeCAD FEM constraint tie object | ||
|
||
|
||
class _FemConstraintTie: | ||
"The FemConstraintTie object" | ||
def __init__(self, obj): | ||
obj.addProperty( | ||
"App::PropertyLength", | ||
"Tolerance", | ||
"Geometry", | ||
"set max gap between tied faces" | ||
) | ||
obj.Proxy = self | ||
self.Type = "Fem::ConstraintTie" | ||
|
||
def execute(self, obj): | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.