Meshing on simple curve uniform plan using vedo
See original GitHub issueShared the ply file above. please can you see add some feature or can check what changes should be done to mesh for this kind of 3d objects. I tried but I am not getting an perfect mesh. as the plane is curve and uniform so please check it plyfile
from vedo import *
plt = Plotter(N=3, axes=dict(zxGrid=True, xyGrid=False))
vpts = load("/home/anveshak-nikhil/Only_codes_my/3march_generate_pc/23_march_bound.ply").clean()
# vpts = load("data/Final_sample_2.ply").clean()
vpts.ps(5).renderPointsAsSpheres().c('k3').alpha(0.6)
# this block removes the vertical lines
print("before", vpts.N())
newpts =[]
for p in vpts.points():
cps = vpts.closestPoint(p, N=2)
for cp in cps:
if mag(cp-p)<0.00000001: # it's the same point p
continue
elif mag(cp-p)>0.00001: # p is "isolated"
newpts.append(p)
vpts = Points(newpts).clean()
print("after", vpts.N())
vpts_orig = vpts.clone() # make a copy
plt.show(vpts_orig, "original pcloud", at=0)
print("Nr of points before cleaning nr. points:", vpts.N())
vpts.clean(tol=0.0005) # impose a min distance among points
print("after cleaning nr. points:", vpts.N())
print("smoothing cloud")
vpts.smoothMLS2D(f=0.15) # smooth cloud by fitting planes recursively
plt.show(vpts, "cloud smoothed", at=1)
# reconstructed surface from point cloud
reco = recoSurface(vpts.points(), dims=[250,36,250], radius=0.002).extractLargestRegion().clean()
reco.subdivide().smoothLaplacian().fillHoles().computeNormals()
# reco.write("result.ply")
plt.show(reco, vpts, "reconstruction", at=2, zoom=1.2, interactive=True)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ANSYS Student: Meshing Best Practices for Students - YouTube
This video shows the best practices for creating different types of mesh.
Read more >Combined Composite Curves and Combined Boundary ...
View our in-depth overview of all the tools in the Femap Meshing Toolbox: https://structures.aero/ meshing -toolbox-femap/Combined / Composite ...
Read more >How to create a Structured (Face) Mesh, Part 2 - Wedge
PART 2 of this video covers a wedge. ... ANSYS CFD Meshing Basics: How to create a Structured (Face) Mesh, Part 2 -...
Read more >Curvature Based Mesh Advantages in SolidWorks Simulation
The Standard mesh does a great job of creating a uniform and reliable mesh. SolidWorks Simulation Mesh Studies. During the Standard meshing ......
Read more >5 Tools to Reduce Time Between Your CAD Model and FE ...
If you are not happy with the shape of your mesh and would like to create uniform elements, you can use the Mesh...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you so much for your reply… it means me a lot… i apprecticate you…is there not any other solution for this for 3d model…
you may play with tetrahedral meshes but it’s probably not a good solution anyway: (you won’t be able to close holes because the mesh is not manifold)