Comments (11)
sorry, I don't 100% understand what you are asking. I'm not sure what you mean by "flat mesh" - do you mean this was originally a curved patch, and you have to convert to triangles?
from geometry3sharp.
I've attached an example of a fragment that can not be simplified and an entire geometry, you can see it in here https://3dviewer.net /. I mean the geometry of a facet of an object.
from geometry3sharp.
yes i looked at the attachment. I don't understand what your question/problem is.
from geometry3sharp.
I can not simplify with the help of Reducer, such parts, whole meshes are normally simplified, and such fragments not , I wanted to clarify whether it is possible to merge such fragments into a one mesh, or to find out the reason why this method does not work.
I'm using the following code for simplify :
var red = mn.Select(x => new Reducer(x));
foreach ( var r in red ) {
r.SetExternalConstraints(new MeshConstraints());
MeshConstraintUtil.FixAllBoundaryEdges(r.Constraints, r.Mesh);
DMeshAABBTree3 tree = new DMeshAABBTree3(new DMesh3(r.Mesh));
tree.Build();
MeshProjectionTarget target = new MeshProjectionTarget(tree.Mesh, tree);
r.SetProjectionTarget(target);
r.ProjectionMode = Reducer.TargetProjectionMode.Inline;
r.ReduceToTriangleCount(200);
}
mn = mn.Select(x => new DMesh3(x, true)).ToList();
from geometry3sharp.
So you are trying to reduce the attached fragment with this code? It won't do anything, there are only 112 triangles (you are trying to reduce to 200).
If you want to connect up the borders of a bunch of fragments, it depends on whether the boundaries match. If they do not, this is a very hard problem, I would suggest trying Make Solid in Autodesk Meshmixer, with repair turned off. If they do line up, DMesh3.MergeEdges() will let you join pairs of edges, but you will have to match them. Alternately you can construct a unique vertex map and then rebuild the mesh w/ the vertices shared. A quick-and-dirty way to do this is just to write it out as an STL and read it back in, the STL reader does this internally.
from geometry3sharp.
This fragment is for example, and in this case (200) nothing will happen, but if you make 50, it will still not happen and the number of triangles will be the same.
Thank you, I will try to follow your advice.
from geometry3sharp.
none of the triangles are connected (blue edges are border edges):
So when you do MeshConstraintUtil.FixAllBoundaryEdges(), it tells the reducer it cannot modify any of the edges.
use the write/read STL thing I mentioned and it will work, at least for an individual patch.
from geometry3sharp.
Thank you, I will use your advice!
from geometry3sharp.
And to unite these faces without re-export is possible? The point is that when I load such fragments, I get an error, maybe I can recreate a grid from a set of meshes and triangles?
from geometry3sharp.
If you look at STLReader.BuildMesh_IdenticalWeld, you will see that the way it is done is quite simple to reproduce directly on a DMesh3. Just build a hash table of vertices, assign each a unique ID, and use that to remap the triangle IDs
from geometry3sharp.
Thank you
from geometry3sharp.
Related Issues (20)
- Is this project dead? HOT 1
- Get brick materials right
- Fix hover info on bricks
- Rewrite right pointer (PLEASE!) HOT 1
- Mesh expansion and comparison
- Refactor cursor3d
- Refactor HandR and HandL to use input action class
- Write playmode tests for right pointer flow
- Rider clean project to adjust line length
- Break up LDrawConfig into different classes
- Refactor BrickMaterialsLoader (PLEASE!!!)
- Example of mesh volume calculation HOT 3
- 这个可以做曲面拟合吗?
- Can this be used for surface fitting?
- Narrow band SDF generation from meshes is adding a shell to objects HOT 1
- Minkowski sum 3D
- Get closest vertex on mesh surface HOT 2
- Boolean operations on polygons and polyhedra?
- Quadratic Bezier Curves HOT 1
- Is it possible to combine 2 adjacent polygons into 1 polygon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geometry3sharp.