Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Face.make_bezier_surface() #552

Merged
merged 3 commits into from
Feb 28, 2024
Merged

Add Face.make_bezier_surface() #552

merged 3 commits into from
Feb 28, 2024

Conversation

fanf2
Copy link
Contributor

@fanf2 fanf2 commented Feb 16, 2024

When making superellipses and superellipsoids with build123d, I have found I get the best results using Bézier curves and surfaces to approximate the shapes. Bézier curves are already supported, but Bézier surfaces were not - at least not without dropping down to OCP.

Here's a sketchy patch based on the code i'm using to construct Bézier surfaces. I have not tried installing build123d from source so I have not properly tested this myself, but I think it's a plausible start.

)
if len(points) > 25 or len(points[0]) > 25:
raise ValueError("The maximum number of control points is 25")
if weights && (len(points) != len(weights) or
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some invalid syntax here on 5721-, can you fix this?

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 76.47059% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 96.29%. Comparing base (b3019fc) to head (014c670).
Report is 36 commits behind head on dev.

Files Patch % Lines
src/build123d/topology.py 76.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #552      +/-   ##
==========================================
+ Coverage   96.24%   96.29%   +0.05%     
==========================================
  Files          24       24              
  Lines        7746     7853     +107     
==========================================
+ Hits         7455     7562     +107     
  Misses        291      291              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gumyr gumyr merged commit cc26304 into gumyr:dev Feb 28, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants