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

Curved cylinder #1376

Open
xiaodongdong101 opened this issue Jun 29, 2023 · 10 comments
Open

Curved cylinder #1376

xiaodongdong101 opened this issue Jun 29, 2023 · 10 comments
Assignees

Comments

@xiaodongdong101
Copy link

Is there a algorithm that can convert 3d polyline to a triangle mesh as shown above?
image
image

@Grantim
Copy link
Contributor

Grantim commented Jun 29, 2023

Hello!

Unfortunately right now we don't have such functionality, We will try to work on it later.
Thanks for suggestion.

@xiaodongdong101
Copy link
Author

Thanks a lot.

@Grantim
Copy link
Contributor

Grantim commented Jun 30, 2023

We have

/// Offsets polyline by converting it to voxels and building iso-surface
/// do offset in all directions
/// so result mesh is always closed
[[nodiscard]] MRMESH_API Expected<Mesh, std::string> offsetPolyline( const Polyline3& polyline, float offset, const OffsetParameters& params = {} );

it is not exactly your case, but it prouce simular output.

@Grantim Grantim self-assigned this Jul 5, 2023
@Grantim
Copy link
Contributor

Grantim commented Jul 7, 2023

Hello!
We have just added

/// makes mesh by moving `body` along `trajectory`
/// if allowRotation rotate it in corners
[[nodiscard]] MRMESH_API Mesh makeMovementBuildBody( const Contours3f& body, const Contours3f& trajectory,
const MovementBuildBodyParams& params = {} );

image
image

image
image

@xiaodongdong101
Copy link
Author

Thanks a lot

@xiaodongdong101
Copy link
Author

If my curves are curved, how do I better avoid intersections?
b981978a8bdc5d61f19efe725edfa09

@Grantim
Copy link
Contributor

Grantim commented Jul 14, 2023

You can use Offset tool to fix it (by casting to voxels and back)

/// Offsets mesh by converting it to voxels and back
/// so result mesh is always closed
[[nodiscard]] MRMESH_API Expected<Mesh, std::string> offsetMesh( const MeshPart& mp, float offset, const OffsetParameters& params = {} );

image
image
image
image
image

@xiaodongdong101
Copy link
Author

Thanks

@xiaodongdong101
Copy link
Author

Hello,I find that solidworks have this function-swept surface.
4ce233d1f844211f469f9da72e84f52
Will this special algorithm be added later?

@Grantim
Copy link
Contributor

Grantim commented Jul 31, 2023

Thanks for pointing on it, we will try to improve our algorithm later!

@Grantim Grantim reopened this Jul 31, 2023
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

No branches or pull requests

2 participants