Body

class Body

Bases: CommonBaseModel

Represents the geometric definition of a body-like surface component, such as an aircraft fuselage or engine nacelle.

reference_axis

Spline defining the reference axis of the body.

Type:

Optional[Spline]

cross_sections

List of CrossSection objects defining the body’s shape at various stations.

Type:

List[CrossSection]

Raises:

ValueError – If the list of cross sections is empty.

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

validate_cross_sections(value)

Ensures that at least one CrossSection object is provided.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'protected_namespaces': (), 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

classmethod validate_cross_sections(value)

Ensures that at least one CrossSection object is provided.

Parameters:

value (List[CrossSection]) – The list of CrossSection objects to validate.

Returns:

The validated list of CrossSection objects.

Raises:

ValueError – If the list is empty.

Return type:

List[CrossSection]

Methods:

validate_cross_sections(value)

Ensures that at least one CrossSection object is provided.

Attributes:

__pydantic_setattr_handlers__

__setattr__ handlers.

classmethod validate_cross_sections(value)

Ensures that at least one CrossSection object is provided.

Parameters:

value (List[CrossSection]) – The list of CrossSection objects to validate.

Returns:

The validated list of CrossSection objects.

Raises:

ValueError – If the list is empty.

Return type:

List[CrossSection]

__pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__