# 3pc-panel

`3pc-panel` is a Python library used to define a composite panel. It provides a `Panel` class to define the panel's geometry, laminate properties, and boundary conditions, built upon the `Laminate` class (provided by the `3pc-laminate` package).

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `3pc-panel`. Since `3pc-panel` and its dependencies are publicly available on PyPI, you can install them directly:

```bash
pip install 3pc-panel 3pc-laminate 3pc-ply 3pc-material 3pc-utils
```

## API Reference

### `Panel` Class

The primary component of this package is the `Panel` class, which holds panel properties and its laminate configuration.

```python
from panel.panel import Panel
```

#### Required Parameters

When initializing `Panel` directly, the following parameters are required:

*   **`panelID`** *(str)*: Panel identifier.
*   **`length`** *(float)*: Panel length, along x direction.
*   **`width`** *(float)*: Panel width, along y direction.
*   **`laminate`** *(Laminate)*: Panel laminate object.
*   **`boundary_condition`** *(str)*: Panel boundary condition (e.g., "SSSS" for all sides simply supported).

### Methods

#### `Panel.fromDict(**kwargs)`

Initializes a `Panel` instance using a dictionary of keyword arguments.

---

## Usage Examples

### Basic Initialization

Below is an example of defining a panel using a laminate.

```python
from material.orthotropic import Orthotropic
from ply.ply import Ply
from laminate.laminate import Laminate
from panel.panel import Panel

# Define the material
zg_material = Orthotropic(
    matID="zg",
    E1=181.0, 
    E2=10.3,
    G12=7.17, 
    G13=7.17, 
    G23=7.17, 
    v12=0.28,
    rho=1.5
)

# Define plies
ply_0 = Ply(plyID="1", angle=0.0, material=zg_material, thickness=0.125)
ply_90 = Ply(plyID="2", angle=90.0, material=zg_material, thickness=0.125)

# Define laminate (0/90)s
lam = Laminate(
    lamID="lam_01", 
    stacking_sequence=[ply_0, ply_90, ply_90, ply_0],
    offset="mid"
)

# Define panel
pnl = Panel(
    panelID="panel_01", 
    length=10.0, 
    width=5.0, 
    laminate=lam, 
    boundary_condition="SSSS"
)
pnl.number_of_terms = 8
```

## Commands

The package provides a command-line interface entry point. After installing, you can run the main application using:

```bash
panel
```
*(Currently, this serves as an entry point defined in `panel.main:main`)*

