MeshLib icon indicating copy to clipboard operation
MeshLib copied to clipboard

Curved cylinder

Open xiaodongdong101 opened this issue 2 years ago • 10 comments

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

xiaodongdong101 avatar Jun 29 '23 10:06 xiaodongdong101

Hello!

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

Grantim avatar Jun 29 '23 12:06 Grantim

Thanks a lot.

xiaodongdong101 avatar Jun 30 '23 01:06 xiaodongdong101

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 avatar Jun 30 '23 12:06 Grantim

Hello! We have just added https://github.com/MeshInspector/MeshLib/blob/7e840dfddf5a41db19cf5932c800a77f1ec7341d/source/MRMesh/MRMovementBuildBody.h#L25-L28

image image

image image

Grantim avatar Jul 07 '23 14:07 Grantim

Thanks a lot

xiaodongdong101 avatar Jul 14 '23 02:07 xiaodongdong101

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

xiaodongdong101 avatar Jul 14 '23 03:07 xiaodongdong101

You can use Offset tool to fix it (by casting to voxels and back) https://github.com/MeshInspector/MeshLib/blob/5bb227da3716ddffbc948428538a21061fcd3cb3/source/MRMesh/MROffset.h#L59-L61

image image image image image

Grantim avatar Jul 14 '23 10:07 Grantim

Thanks

xiaodongdong101 avatar Jul 15 '23 01:07 xiaodongdong101

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

xiaodongdong101 avatar Jul 31 '23 10:07 xiaodongdong101

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

Grantim avatar Jul 31 '23 10:07 Grantim