Comments (3)
I don't have a valid ACIS license anymore, so I cannot test it. ZeroDivisionError
may happen, because the algorithms are using the user input directly. There is a frange
implementation, but I doubt that's the problem. There were several other problems like that and converting values like -59.99999999999998579
to -60
worked fine at that point. You could try that.
I was planning to implement a more precise floating point control to eliminate such issues, but never had time to do it without adding any additional dependencies.
from nurbs-python.
I don't have a valid ACIS license anymore, so I cannot test it.
ZeroDivisionError
may happen, because the algorithms are using the user input directly. There is afrange
implementation, but I doubt that's the problem. There were several other problems like that and converting values like-59.99999999999998579
to-60
worked fine at that point. You could try that.I was planning to implement a more precise floating point control to eliminate such issues, but never had time to do it without adding any additional dependencies.
I changed this snippets to
from geomdl import BSpline
# Create a BSpline surface instance (Bezier surface)
surf = BSpline.Surface()
surf.degree_u=2
surf.degree_v=2
surf.ctrlpts_size_u=5
surf.ctrlpts_size_v=9
surf.ctrlpts=[
(52.5, 60, 0),
(52.5, 60, 60),
(52.5, 0, 60),
(52.5, -60, 60.0),
(52.5, -60, 0),
(52.5, -60.0, -60),
(52.5, 0, -60),
(52.5, 60, -60.0),
(52.5, 60, 0),
(17.5, 60, 0),
(17.5, 60, 60),
(17.5, 0, 60),
(17.5, -60, 60),
(17.5, -60, 0),
(17.5, -60, -60),
(17.5, 0, -60),
(17.5, 60, -60),
(17.5, 60, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(17.5, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
(0, 0, 0),
]
surf.weights=[
1, 0.707107, 1, 0.707107, 1, 0.707107, 1, 0.707107, 1, 0.707107, 0.5, 0.707107, 0.5, 0.707107, 0.5, 0.707107, 0.5, 0.707107, 1, 0.707107, 1, 0.707107, 1, 0.707107, 1, 0.707107, 1, 0, 52.5, 60, 0, 52.5, 60, 60, 52.5, 0, 60, 52.5, -60, 60, 52.5, -60, 0, 52.5, -60, ]
surf.knotvector_u=[0, 0, 0, 1, 1, 1, 1, 1, ]
surf.knotvector_v=[0, 0, 0, 0.25, 0.25, 0.5, 0.5, 0.75, 0.75, 1, 1, 1, ]
# Evaluate surface points
surf.evaluate()
# Plot the control points grid and the evaluated surface
surf.vis = VisMPL.VisSurface(vis_config)
I am still encountering the same error.
from nurbs-python.
Could you also update the weights like you did for the control points? I'd try converting 0.707107
to 0.70711
and remove one significant if it doesn't work.
from nurbs-python.
Related Issues (20)
- fitting error when use approximate_curve HOT 1
- NURBS.surfaces: derivatives evaluation HOT 1
- Incorrect control points calculation in knot insertion procedure, under certain circumstances
- [Suggesion] The Axes3D is not an appropriate way to create the 3D axis handle HOT 1
- Import obj fails with ValueError invalid literal for `int()` with base 10 '1//1' HOT 1
- numpy v1.24 compatibility HOT 2
- operations.split_curve
- Visualization (VisMPL) is showing an empty figure HOT 4
- Interpolating a hemispherical shape leads to ZeroDivisionError HOT 3
- VisPlotly not return the figure object HOT 1
- Visualizing surface without ordering control points HOT 3
- BSpline interpolation and approximation boundary conditions
- Problem in Visualization for Sample code HOT 2
- export 3D nurbs curves
- Tangent and Normal operation no results
- NURBS.Curve.__eq__ returns True for different curves
- B-spline surface points does not correspond to model u, v parameter HOT 3
- helper.knot_removal returns incorrect result (+ fix) HOT 2
- the circle area weight
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nurbs-python.