Skip to main content

Tools to create FFD operator from point cloud.

Project description

PyFFD

PyFFD is an open-source Free Form Deformation (FFD) library.

Mathematics

We define the FFD opperator as $R_s = \left[ B_i \left( x_j \right) \right]_{(i,j)}$ using B-Spline functions such as:

B(x) = 
    \begin{bmatrix}
        B_1(x) \\
        B_2(x)\\
        \vdots\\
        B_i(x)
    \end{bmatrix}

We can easily project a vector like :

$$ b_s = R_s^T ~ b $$

Code

Quick start

(1) Define a FEM mesh :

n = np.array([[x0, y0], [x1, y1], ...])

(2) Define the elements size and degree for the B-Spline box in each direction :

# Element size per directions
size = [size_x, size_y]
# global setting
size = 0.1 # example

# Element degree per directions
deg = [deg_x, deg_y]
# global setting
deg = 3 # example

(3) Create the B-Spline box python object :

sbox = pf.FFD(n, size, deg)

(4) Compute the FFD opperator $R_s$ :

Rs = sbox.OperatorFFD()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyFFD-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyFFD-0.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file PyFFD-0.1.1.tar.gz.

File metadata

  • Download URL: PyFFD-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for PyFFD-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2a99b8ba9bd5a3b7f0aa74b83ceabde83b4d961d833ab478f68e58ac59c0d5b
MD5 333741cdad1bb1b15866e8c0fa9b9a2d
BLAKE2b-256 ad4126e477855563b508864170e9c03f9c79e8a5c4bca2c18fd5fe19ccc9211e

See more details on using hashes here.

File details

Details for the file PyFFD-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: PyFFD-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for PyFFD-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e42d9d5d29a13111ffdecf00b8c151e0692b3507d44ccdc90683a7b7d2a87036
MD5 fa071152a3109857064cd48048331ef3
BLAKE2b-256 0dd3e7d91bf86024d95243d95aa87c0780a4457de4bab1b21b60e89bdb7a0824

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page