Added Hydrostatics development tools
This commit is contained in:
parent
d6593e4db1
commit
b52cf546f7
|
@ -57,6 +57,12 @@ SET(ShipAreasCurve_SRCS
|
|||
)
|
||||
SOURCE_GROUP("shipareascurve" FILES ${ShipAreasCurve_SRCS})
|
||||
|
||||
SET(ShipHydrostatics_SRCS
|
||||
shipHydrostatics/__init__.py
|
||||
shipHydrostatics/Tools.py
|
||||
)
|
||||
SOURCE_GROUP("shiphydrostatics" FILES ${ShipHydrostatics_SRCS})
|
||||
|
||||
SET(ShipUtils_SRCS
|
||||
shipUtils/__init__.py
|
||||
shipUtils/Math.py
|
||||
|
@ -65,7 +71,7 @@ SET(ShipUtils_SRCS
|
|||
)
|
||||
SOURCE_GROUP("shiputils" FILES ${ShipUtils_SRCS})
|
||||
|
||||
SET(all_files ${ShipMain_SRCS} ${ShipIcons_SRCS} ${ShipCreateShip_SRCS} ${ShipOutlineDraw_SRCS} ${ShipAreasCurve_SRCS} ${ShipUtils_SRCS})
|
||||
SET(all_files ${ShipMain_SRCS} ${ShipIcons_SRCS} ${ShipCreateShip_SRCS} ${ShipOutlineDraw_SRCS} ${ShipAreasCurve_SRCS} ${ShipHydrostatics_SRCS} ${ShipUtils_SRCS})
|
||||
|
||||
ADD_CUSTOM_TARGET(Ship ALL
|
||||
SOURCES ${all_files}
|
||||
|
@ -97,6 +103,12 @@ INSTALL(
|
|||
DESTINATION
|
||||
Mod/Ship/shipAreasCurve
|
||||
)
|
||||
INSTALL(
|
||||
FILES
|
||||
${ShipHydrostatics_SRCS}
|
||||
DESTINATION
|
||||
Mod/Ship/shipHydrostatics
|
||||
)
|
||||
INSTALL(
|
||||
FILES
|
||||
${ShipUtils_SRCS}
|
||||
|
|
|
@ -43,6 +43,8 @@ nobase_data_DATA = \
|
|||
shipAreasCurve/Preview.py \
|
||||
shipAreasCurve/TaskPanel.py \
|
||||
shipAreasCurve/TaskPanel.ui \
|
||||
shipHydrostatics/__init__.ui \
|
||||
shipHydrostatics/Tools.ui \
|
||||
shipUtils/__init__.py \
|
||||
shipUtils/Math.py \
|
||||
shipUtils/Paths.py \
|
||||
|
|
36
src/Mod/Ship/shipHydrostatics/Tools.py
Normal file
36
src/Mod/Ship/shipHydrostatics/Tools.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
#***************************************************************************
|
||||
#* *
|
||||
#* Copyright (c) 2011, 2012 *
|
||||
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
|
||||
#* *
|
||||
#* 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 *
|
||||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
import math
|
||||
# FreeCAD modules
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
|
||||
def Displacement(ship, draft, trim):
|
||||
""" Calculate ship displacement.
|
||||
@param ship Selected ship instance
|
||||
@param traft Draft.
|
||||
@param trim Trim in degrees.
|
||||
@return Ship displacement, also X bouyance center coordinate is provided.
|
||||
"""
|
||||
return [0.0, 0.0]
|
23
src/Mod/Ship/shipHydrostatics/__init__.py
Normal file
23
src/Mod/Ship/shipHydrostatics/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
#***************************************************************************
|
||||
#* *
|
||||
#* Copyright (c) 2011, 2012 *
|
||||
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
|
||||
#* *
|
||||
#* 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 *
|
||||
#* *
|
||||
#***************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user