Questions tagged [mesh]

Do NOT use for questions about mesh-networks. Use [mesh-network] instead. A mesh is a collection of vertices, edges, and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling.

From Wikipedia:
A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling. The faces usually consist of triangles, quadrilaterals or other simple convex polygons, since this simplifies rendering, but may also be composed of more general concave polygons, or polygons with holes. Check for more Mesh Detail

2641 questions
4
votes
4 answers

I want to generate a mesh from a point cloud in Python

I have a point cloud from different parts of the human body, like an eye and I want to do a mesh. I tried to use Mayavi and Delaunay but I don't get a good mesh. The points of the cloud are in total disorder. I have my point cloud in .npz…
Joel_Developer
  • 63
  • 1
  • 2
  • 10
4
votes
1 answer

How to generate a torus knot?

Let me start the question by providing some boilerplate code we'll use to play around: mcve_framework.py import time from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import glm from glm import unProject from glm import…
BPL
  • 9,632
  • 9
  • 59
  • 117
4
votes
1 answer

Get Contiguous Faces In a Mesh

I am looking for an algorithm to find all (or maximum no of) contiguous faces of a continuous mesh. The faces should be ordered in an array in such a way that each face is preceded by a face linked to it on the mesh. The ultimate goal is to have a…
4
votes
1 answer

How to avoid hole filling in surface reconstruction?

I am using Poisson surface reconstruction algorithm to reconstruct triangulated mesh surface from points. However, Poisson will always generate a watertight surface, which fills all holes with interpolation. For some small holes that is the result…
Summer Sun
  • 947
  • 13
  • 33
4
votes
2 answers

How to undo an action in gmsh

I just connected two points with a straight line in gmsh, but how can I undo it ?
user7086216
4
votes
1 answer

Unity: Wrap mesh softly around other mesh?

Given one mesh (like the cubic object on the left) and another custom sphere-like mesh (on the right; it could be another shape if easier), how would one in Unity & C# during runtime softly wrap the second mesh around the first? Thanks!
Philipp Lenssen
  • 8,818
  • 13
  • 56
  • 77
4
votes
4 answers

Remeshing 3D triangulated surface for better mesh quaility

I am using marching cubes to extract a 2D surface from a volume. In this case a Gyroid. import numpy as np from numpy import sin, cos, pi from skimage import measure import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D def…
DrBwts
  • 3,470
  • 6
  • 38
  • 62
4
votes
1 answer

Calculate median 3D vector (instead of average)?

I have a 3D mesh I'm calculating vertex normals for, from the mesh's face normals. Each vertex normal is computed as an average of all the normals of the faces that share that vertex. All that works fine, except in cases where -- due to uneven…
Tyson
  • 1,226
  • 1
  • 10
  • 33
4
votes
3 answers

How to find only the "top" of a mesh in Unity

I need to determine the vertices of a polytope (mesh), in Unity, that make up its "top"; that is, the furthest points along the y-axis. The reason for this is that I am creating a procedural environment with a number of mesh dynamics active in it;…
Michael Macha
  • 1,729
  • 1
  • 16
  • 25
4
votes
2 answers

Calculate accurately the total number of vertices and faces in Wavefront .obj file in Python?

Dragging a 3D object as .obj file (Wavefront .obj file) to MeshLab or any other 3D graphics tells you the exact total number of faces and total number of vertices the model has. Vertices could be triangular or polygonal. Is there any way to…
HB87
  • 413
  • 7
  • 16
4
votes
1 answer

Any way to make gmsh to use the same vertex set on both sides of a material boundary?

I am trying to mesh a complex geometry composed of 3 kinds of materials, like below: The geometry is imported from a *.stp file. I defined several physical surfaces and 3 physical domains in the geo file: Physical Surface("air-case", 1) = {50, 42,…
4
votes
1 answer

What is a linear / angular deflection in OpenCASCADE's Incremental Mesh?

Lately I've been using OpenCASCADE (PythonOCC, to be precise) for some CAD operations, including meshing shapes, and stumbled upon this class: BRepMesh_IncrementalMesh. I didn't find any hints on what the theLinDeflection and theAngDeflection…
Jytug
  • 1,072
  • 2
  • 11
  • 29
4
votes
1 answer

Open CV (Python) - Abnormal shape blob detection for brain tumors

I'm trying to identify brain tumors with blob detection in Open CV, but so far, Open CV only detects tiny circles in brain MRIs, but never the tumor itself. Here's the code: import cv2 from cv2 import SimpleBlobDetector_create,…
Dean D
  • 63
  • 6
4
votes
0 answers

Algorithm to constrain moving point onto 3d surface

I'm not really sure where to start looking for info about this question, so I'm asking here. Hopefully it's not too general. I've written a particle library in C++ and am trying to add the ability to constrain particles to the surface of a mesh. Not…
Tyson
  • 1,226
  • 1
  • 10
  • 33
4
votes
2 answers

Drawing triangular mesh using gnuplot

It is often need to draw triangular mesh using gnuplot. Only way I currently see is to make "wireframe" using with lines option and double newlines between closed chains of lines (first and last point are the same) for each facet: $wireframe <
Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169