Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
3208a92
dev: add makefile to help development
carlos-adir Jun 22, 2025
db6d568
test: set __init__ to include `src` folder
carlos-adir Jun 22, 2025
cccbaf4
feat: add polynomial class
carlos-adir Jun 22, 2025
6a2c6e8
test: add test for polynomial
carlos-adir Jun 22, 2025
79dbdcd
docs: improve docs of `scale` and `shift` of polynomial
carlos-adir Jun 22, 2025
f779c3f
refac: move derivate function outside the class
carlos-adir Jun 23, 2025
9059fd6
test: improve test for polynomials
carlos-adir Jun 23, 2025
37cd4cd
feat: add __eq__ function for polynomial
carlos-adir Jun 23, 2025
670bc71
test: improve polynomial tests
carlos-adir Jun 23, 2025
4a78776
fix: evaluate and __str__
carlos-adir Jun 23, 2025
44d85cd
feat: add piecewise polynomial function
carlos-adir Jun 24, 2025
d1ffa54
refactor: move math functions to a cmath.py file
carlos-adir Jun 27, 2025
1072d7c
refactor: move ImmutableKnotVector into knotspace.py
carlos-adir Jun 27, 2025
4616de9
fix: remove possibility of receive empty tuple as input of polynomial
carlos-adir Jun 27, 2025
7bb06ef
refactor: move evaluation of splines into basisfunction.py
carlos-adir Jun 27, 2025
d341228
refactor: move core functions and classes into core folder
carlos-adir Jun 27, 2025
007c77e
fix: evaluation of core basis functions
carlos-adir Jun 27, 2025
4df3f02
fix: evaluation of spline and rational splines values
carlos-adir Jun 27, 2025
d8e71c9
feat: implement division of polynomials
carlos-adir Jun 27, 2025
8f09ae5
feat: add integration of polynomials
carlos-adir Jun 28, 2025
0381aa6
refactor: move operations on knotvector to `core/operations.py` file
carlos-adir Jun 28, 2025
16a0e9b
feat: implement finding roots of polynomials
carlos-adir Jun 28, 2025
5b88b61
dev: remove ValueError and TypeError from coverage
carlos-adir Jun 28, 2025
f5a0ec2
feat: add vectorize decorator to treat arrays of parameters
carlos-adir Jun 29, 2025
04c55bf
fix: evaluation of basis function when knotvector.degree != degree
carlos-adir Jun 29, 2025
2bfebd3
refactor: use class that evaluates the basis functions
carlos-adir Jun 29, 2025
11ff402
refactor: move `custom_math` to `core`
carlos-adir Jun 29, 2025
1d98ae6
del: remove meaningless interface classes
carlos-adir Jun 29, 2025
1996a39
feat: add immutable manifold to evaluate curves
carlos-adir Jun 29, 2025
3ba187a
refactor: remove eval function to use __call__
carlos-adir Jun 30, 2025
927a062
feat: implement __add__, __sub__, __mul__ on piecewise
carlos-adir Jun 30, 2025
c0aa51b
feat: add __matmul__ for Polynomial
carlos-adir Jun 30, 2025
f70593e
fix: Polynomial receives numpy array as argument
carlos-adir Jul 1, 2025
34fcd71
fix: operations __add__, __mul__ and __matmul__ for piecewise
carlos-adir Jul 1, 2025
11aab7f
test: add tests for piecewise functions
carlos-adir Jul 1, 2025
46f12ec
fix: raise ValueError when find_span outside interval
carlos-adir Jul 1, 2025
0c9c523
fix: __matmul__ function for polynomials
carlos-adir Jul 1, 2025
d45601b
fix: __matmul__ and __mul__ operation for Piecewise
carlos-adir Jul 1, 2025
947b0fe
test: add piecewise operations with scalars
carlos-adir Jul 1, 2025
3dc9f62
fix: __str__ and __repr__ for piecewise polynomial
carlos-adir Jul 1, 2025
027fc9a
refactor: move operations of knotvectors to a separated folder
carlos-adir Jul 1, 2025
75d1acb
test: move custom_math to core folder
carlos-adir Jul 1, 2025
89a0056
dev: add __init__ file on operations and tests
carlos-adir Jul 1, 2025
7abc89d
fix: import due to move core.operations to operations.knotvector
carlos-adir Jul 1, 2025
2f54e5c
refactor: move roots.py and tools.py to operations folder
carlos-adir Jul 1, 2025
6d0dbd3
refactor: move `knotspace`, `functions` and `curves` to submodule
carlos-adir Jul 1, 2025
c80ed09
refactor: move advanced, calculus and heavy to submodule
carlos-adir Jul 1, 2025
dcd022a
refactor: separate least_square from heavy
carlos-adir Jul 1, 2025
e2903d7
test: change test order for responsive
carlos-adir Jul 1, 2025
047637d
test: move test of operations on knotvector to operations folder
carlos-adir Jul 1, 2025
5cc6cf5
test: change order of core tests
carlos-adir Jul 1, 2025
8012844
test: change order of operations tests
carlos-adir Jul 1, 2025
a549900
test: fix test least square to remove Class name
carlos-adir Jul 1, 2025
893a24a
test: fix depedency of tests
carlos-adir Jul 1, 2025
51b260f
fix: import of least_square functions on curves.py
carlos-adir Jul 1, 2025
701fd28
refactor: move eval_spline_nodes and eval_rational_nodes to least_square
carlos-adir Jul 1, 2025
71a28f2
fix: relative import of functions
carlos-adir Jul 1, 2025
9e307c9
tests: fix dependency on tests
carlos-adir Jul 1, 2025
4c4d8f1
refactor: rename basis functions to spline basis
carlos-adir Jul 2, 2025
874a419
refactor: make ImmutableKnotVector not inherit from tuple
carlos-adir Jul 2, 2025
abe358d
refactor: KnotVector due to recent changes
carlos-adir Jul 2, 2025
ed73fbe
refactor: Function due to last changes
carlos-adir Jul 2, 2025
45aaa7a
feat: add __str__ and __repr__ for knotvector
carlos-adir Jul 2, 2025
97440e0
fix: call of knotvector operations
carlos-adir Jul 2, 2025
cc2bebb
fix: check if received parameter is already KnotVector
carlos-adir Jul 2, 2025
8aa7481
fix: reference to IntegratorArray and NodeSample
carlos-adir Jul 2, 2025
bf95521
feat: define and use function that tells if it's a number
carlos-adir Jul 2, 2025
9bab3da
feat: add function that checks if object supports linear operations
carlos-adir Jul 2, 2025
c83c2af
fix: use isnumber function when setting for weights
carlos-adir Jul 2, 2025
5c404a0
style: insert message inside ValueError directly
carlos-adir Jul 2, 2025
330273d
test: fix test dependency for advanced
carlos-adir Jul 2, 2025
f186b49
docs: fix docstrings of functions due to \i and \m chars
carlos-adir Jul 2, 2025
7c5da6f
fix: construction of piecewise polynomial from spline basis
carlos-adir Jul 3, 2025
6b7c43c
feat: add __eq__ comparator for Piecewise polynomial
carlos-adir Jul 3, 2025
f8c0b8f
feat: add __str__ for spline basis function
carlos-adir Jul 3, 2025
07add0c
fix: creation of piecewise polynomial from basis
carlos-adir Jul 3, 2025
e4e3c21
fix: isnumber function to accept numpy arrays
carlos-adir Jul 3, 2025
9e81403
feat: Polynomial now accepts Real parameter
carlos-adir Jul 3, 2025
8d45deb
feat: transform function to Polynomial if it's not already in Piecewise
carlos-adir Jul 3, 2025
5d0c3ae
test: add tests to check the coefs of piecewise obtained from spline
carlos-adir Jul 3, 2025
83273c7
refactor: compare two basis functions
carlos-adir Jul 4, 2025
380042e
style: minor corrections of formating
carlos-adir Jul 4, 2025
40cfa33
refactor!: rename class 'Function' to 'BasisFunctions'
carlos-adir Jul 4, 2025
1a41e7e
refactor: move KnotVector and BasisFunction one folder up
carlos-adir Jul 4, 2025
b8f6a8b
refactor: rename files to put all curves in one place
carlos-adir Jul 4, 2025
ec4879f
refactor: divide curves file into two
carlos-adir Jul 4, 2025
6d7701c
fix: problem due to call child class on parent class
carlos-adir Jul 4, 2025
66d5e25
refactor: set tolerance as attribute of Curve
carlos-adir Jul 4, 2025
e369d2b
fix: vectorize function to use isnumber
carlos-adir Jul 5, 2025
be48b90
refactor: rename isnumber to isscalar
carlos-adir Jul 5, 2025
4ce8f47
refactor: move evaluation of nurbs curve into BaseCurve
carlos-adir Jul 5, 2025
6edb25c
refactor: make degree increase and degree decrease call degree setter
carlos-adir Jul 5, 2025
f0ef4b1
test: add test for factorial
carlos-adir Jul 6, 2025
0a8330f
refactor: use Math.binom instead of Math.comb
carlos-adir Jul 6, 2025
a07d1a3
dev: update dependencies to include rbool
carlos-adir Jul 6, 2025
5bd7ab2
feat: include rbool as package to make boolean operations on real line
carlos-adir Jul 6, 2025
6aa1cd3
del: remove manifold - it will be added only in future version
carlos-adir Jul 6, 2025
db78b11
fix: ignore complex roots of polynomial
carlos-adir Jul 6, 2025
61742b0
refactor: check of roots of weight curve
carlos-adir Jul 6, 2025
33546b0
del: remove unused code
carlos-adir Jul 6, 2025
b34be84
dev: fix coverage requirement
carlos-adir Jul 6, 2025
f9f9d43
dev: fix poetry lock file
carlos-adir Jul 6, 2025
c4c4adf
refactor: rename piecepoly to piecewise
carlos-adir Jul 6, 2025
edd2b8a
dev: flake8 ignore not used imports on __init__.py file
carlos-adir Jul 6, 2025
4be2736
style: set maximal line lenght to 79 chars
carlos-adir Jul 6, 2025
f669b05
style: fix format with flake8
carlos-adir Jul 6, 2025
78b1d87
style: flake8 improve format to remove 'Matrix2D' type
carlos-adir Jul 6, 2025
b68f06f
style: improve format with flake8
carlos-adir Jul 6, 2025
a0b0a83
style: flake8 and pylint ignore some errors to fix later
carlos-adir Jul 6, 2025
24bf529
fix: add missing static method decorator
carlos-adir Jul 6, 2025
b100140
style: general improvements on code formatting
carlos-adir Jul 7, 2025
3054e02
feat: add function to set temporary tolerance
carlos-adir Jul 7, 2025
03b2e8d
refactor: move least_square to curves submodule
carlos-adir Jul 8, 2025
8350b1f
refactor: move projection and intersection to curves submodule
carlos-adir Jul 8, 2025
9499024
docs: add documentation for math functions
carlos-adir Jul 8, 2025
1ebe493
dev: update python version
carlos-adir Jul 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ exclude_lines =

# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError
raise ValueError
raise TypeError
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand Down
11 changes: 11 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[MAIN]

disable=
too-many-lines,
duplicate-code,
missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
invalid-name,
too-many-locals,
too-many-statements,
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ The documentation can be found at [pynurbs.readthedocs.io][docs-url]

Please use the [Issues][issues-url] or refer to the email ```compmecgit@gmail.com```

For developers, please use `poetry` as virtual enviroment

```
poetry shell
pytest
```

<!-- Badges: -->

<!-- Badges: -->
Expand Down
19 changes: 19 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

test:
pytest --cov=src/pynurbs --cov-report=xml tests
python3-coverage report -m --fail-under 90
python3-coverage html

format:
isort src
isort tests
black src
black tests
flake8 src
pylint src

docs:
sphinx-autobuild docs/ docs/_build/html

html:
brave htmlcov/index.html
994 changes: 602 additions & 392 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
[tool.poetry]
name = "pynurbs"
version = "1.1.0"
version = "1.2.0"
description = "NURBS python object-oriented library"
readme = "README.md"
authors = ["Carlos Adir <carlos.adir.leite@gmail.com>"]
packages = [{ include = "pynurbs", from = "src" }]

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.5"
numpy = "^1"
rbool = "^0"

[tool.poetry.dev-dependencies]
python = "^3.5"
numpy = "^1"
rbool = "^0"
pytest = "^5.2"
coverage = "^7"
pytest-order = "^1.0"
pytest-timeout = "^1.0"
pytest-dependency = "^0.6"
pre-commit = "^2.19.0"
scriv = {extras = ["toml"], version = "^0.15.2"}

Expand All @@ -21,3 +30,6 @@ version = "literal: src/pynurbs/__init__.py: __version__"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 79
114 changes: 0 additions & 114 deletions src/pynurbs/__classes__.py

This file was deleted.

6 changes: 2 additions & 4 deletions src/pynurbs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from .advanced import Intersection, Projection
from .calculus import Derivate, Integrate
from .curves import Curve
from .functions import Function
from .basis_functions import BasisFunctions
from .knotspace import GeneratorKnotVector, KnotVector
from .operations.calculus import Derivate, Integrate

__version__ = "1.1.0"

Expand Down
Loading
Loading