TankInstance.Tank Class Reference

Public Member Functions

def execute (self, fp)
 
def getCoG (self, fp, vol, roll=Units.parseQuantity("0 deg"), trim=Units.parseQuantity("0 deg"))
 
def getVolume (self, fp, level, return_shape=False)
 
def onChanged (self, fp, prop)
 

Member Function Documentation

◆ execute()

def TankInstance.Tank.execute (   self,
  fp 
)
Detects the entity recomputations.

Keyword arguments:
fp -- Part::FeaturePython object affected.

Referenced by ArchSite.Compass.buildCoordinates(), ArchSchedule.CommandArchSchedule.IsActive(), and FeaturePython.DistanceBolt.onChanged().

◆ getCoG()

def TankInstance.Tank.getCoG (   self,
  fp,
  vol,
  roll = Units.parseQuantity("0 deg"),
  trim = Units.parseQuantity("0 deg") 
)
Return the fluid volume center of gravity, provided the volume of
fluid inside the tank.

The returned center of gravity is referred to the untransformed ship.

Keyword arguments:
fp -- Part::FeaturePython object affected.
vol -- Volume of fluid.
roll -- Ship roll angle.
trim -- Ship trim angle.

If the fluid volume is bigger than the total tank one, it will be
conveniently clamped.

References TankInstance.Tank.getVolume(), Fem::FemMesh.getVolume(), and Mesh::MeshObject.getVolume().

◆ getVolume()

def TankInstance.Tank.getVolume (   self,
  fp,
  level,
  return_shape = False 
)
Return the fluid volume inside the tank, provided the filling level.

Keyword arguments:
fp -- Part::FeaturePython object affected.
level -- Percentage of filling level (interval [0, 1]).
return_shape -- False if the tool should return the fluid volume value,
True if the tool should return the volume shape.

Referenced by TankInstance.Tank.getCoG().

◆ onChanged()

def TankInstance.Tank.onChanged (   self,
  fp,
  prop 
)
Detects the ship data changes.

Keyword arguments:
fp -- Part::FeaturePython object affected.
prop -- Modified property name.

Referenced by ArchSite.Compass.buildCoordinates(), and ArchAxis.CommandArchGrid.IsActive().


The documentation for this class was generated from the following file:
  • src/Mod/Ship/TankInstance.py