Skip to main content

NURBS-diff is a differentiable layer that can be run as a standalone layer for CAD applications like curve fitting, surface fitting, surface offseting, and other applications that rely on Non-uniform rational B-splines (NURBS) for representation..

Project description

NURBS_Diff : A Differentiable NURBS Layer for Machine Learning CAD Applications

NURBS-diff is a differentiable layer that can be run as a standalone layer for CAD applications like curve fitting, surface fitting, surface offseting, and other applications that rely on Non-uniform rational B-splines (NURBS) for representation. NURBS are the current standard for representing CAD geometries, and this work seeks to bridge the gap that currently exists between Deep Learning and Computer-Aided design.
The NURBS-diff layer can also be integrated with other DL frameworks for surface reconstruction to produce accurate rational B-spline surfaces as the output. NURBS_Diff layer

Requirements and Install dependencies

Dependencies

  1. Pytorch: Installation command can be generated from here.
  2. Pytorch 3D:
    • For CPU only install pip install pytorch3d should do
    • For macOS running on Apple Silicon MACOSX_DEPLOYMENT_TARGET=10.14 CC=clang CXX=clang++ pip install "git+https://github.com/facebookresearch/pytorch3d.git"
    • For GPU support, we would need to install pytorch3d using the following process TBD pip install "git+https://github.com/facebookresearch/pytorch3d.git"
    • Or use pip install pipablepytorch3d

Examples

Each of the examples can be run using either the CPU version of the code, or the GPU version of the code (available as 'cuda' or 'tc'). \n To run each of the examples, first carry out the build using setup.py.

Curve Fitting

  • Code can be found under examples/curve_fitting_on_point_clouds.py
  • The layer can be used to fit generic 2D and 3D curves, and point clouds obtained from images.
  • To run curve_fitting_on_point_clouds.py, provide a random initialization of input control points, input point cloud and set the number of evaluation points.
  • Parameters to vary: degree, number of control points, number of evaluation points.
  • Dataset used : Pixel dataset provided under Skelneton challenge.

Surface Fitting

  • Code can be found under examples/{surface_fitting.py, nurbs_surface_fitting.py}
  • The layer can fit rational and NURBS surfaces.
  • Provide input control point grid, number of evaluation points in u, v direction, degree.

Surface Offseting

  • Code found under examples for different cases.

Surface reconstruction using Deep Learning

Non-rational B-splines

\n

Rational B-splines

Will be added soon:

  • Support for trimmed NURBS surfaces
  • Support for automatically learning number of control points
  • Dataset for NURBS and trimmed NURBS surfaces

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

pipablenurbsdiff-0.0.5.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

pipableNURBSDiff-0.0.5-py3-none-any.whl (15.0 MB view details)

Uploaded Python 3

File details

Details for the file pipablenurbsdiff-0.0.5.tar.gz.

File metadata

  • Download URL: pipablenurbsdiff-0.0.5.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.15

File hashes

Hashes for pipablenurbsdiff-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e58e71cc2671d887c9e7970268b865722d610311e23d0917b72513740cac7f68
MD5 bb0ca1d7ce3121504fe8a59120105702
BLAKE2b-256 cd8138e198f902ad41c8ddab953ffe72f513ee899a0db86944e3b8918502e5b1

See more details on using hashes here.

File details

Details for the file pipableNURBSDiff-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pipableNURBSDiff-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 15.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.15

File hashes

Hashes for pipableNURBSDiff-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4e2f039e416866b811a8a80f0b1da457e650e87dc006d05d1187b37b9cb619
MD5 c62a3fdf32a7c7069f4ef98427a8d69e
BLAKE2b-256 d8a713b5a5a40a36377e46c0d7e7ccdf08304feacb575c020075266990f47823

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