Composite Component#

class hypervehicle.components.composite.CompositeComponent(stl_resolution: int = 2, verbosity: int = 1, name: str = None)[source]#

Bases: Component

A composite component.

This Component allows adding multiple components to it, which will all form the patches of this component. Note that this means all components added will share the same stl resolution, regardless of what their previously assigned resolution was. This is because all individual component patches become merged to form the CompositeComponent.patches.

__init__(stl_resolution: int = 2, verbosity: int = 1, name: str = None) None[source]#
add_component(component: Component, reflection_axis: str = None, append_reflection: bool = True, curvatures: List[Tuple[str, Callable, Callable]] = None, clustering: Dict[str, float] = None, transformations: List[Tuple[str, Any]] = None) None[source]#

Adds a new component to the vehicle.

Parameters:
  • component (Component) – The component to add.

  • reflection_axis (str, optional) – Include a reflection of the component about the axis specified (eg. ‘x’, ‘y’ or ‘z’). The default is None.

  • append_reflection (bool, optional) – When reflecting a new component, add the reflection to the existing component, rather than making it a new component. The default is True.

  • curvatures (List[Tuple[str, Callable, Callable]], optional) – A list of the curvatures to apply to the component being added. This list contains a tuple for each curvature. Each curvatue is defined by (axis, curve_func, curve_func_derivative). The default is None.

  • clustering (Dict[str, float], optional) – Optionally provide clustering options for the stl meshes. The default is None.

  • transformations (List[Tuple[str, Any]], optional) – A list of transformations to apply to the nominal component. The default is None

generate_patches()[source]#

Generates the parametric patches from the parameter dictionary.