Git Product home page Git Product logo

cinolib's People

Contributors

bbrrck avatar daichi-ishida avatar danielacabiddu avatar gcherchi avatar hartmannathan avatar islam0mar avatar marzer avatar mlivesu avatar pizza1994 avatar tommasosorgente avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cinolib's Issues

OpenGL rendering: soft shadows

Hello,

Do you think it would be possible to add soft shadows effects to the rendering system of Cinolib viewer ? Or do we have to send request to glfw ?

thank you.

Example 23 of Sharp Creases

Hello,

While I was able to run most of the example, I am unable to see sharp edges in the example 23. The value on the webpage is set to 60 which I also did (on the same example), but nothing changed.

Support for Semantic Versioning

Hello,

thank you very much for your tremendous work on this library!
Would it be possible to add support for semantic versioning?
I know that there is the 1.0 tag. However, it seems to be out of date.

no member named 'update_hex_quality'

Hi,
When I try to compile LoopyCuts, I got a error from cinolib, the error is shown blow.
In file included from ./definitions.h:30: In file included from ../lib/cinolib/include/cinolib/meshes/meshes.h:49: In file included from ../lib/cinolib/include/cinolib/meshes/hexmesh.h:124: ../lib/cinolib/include/cinolib/meshes/hexmesh.cpp:405:19: error: no member named 'update_hex_quality' in 'cinolib::Hexmesh<cinolib::Mesh_std_attributes, MV, ME, MF, MP>' this->update_hex_quality(pid); ~~~~ ^ export_helper.cpp:37:12: note: in instantiation of member function 'cinolib::Hexmesh<cinolib::Mesh_std_attributes, MV, ME, MF, MP>::poly_fix_orientation' requested here hm.poly_fix_orientation(); // meta mesh does not have globally consistent winding numbers... ^ In file included from export_helper.cpp:27: In file included from ./export_helper.h:30: In file included from ./state.h:36: In file included from ./definitions.h:30: In file included from ../lib/cinolib/include/cinolib/meshes/meshes.h:49: In file included from ../lib/cinolib/include/cinolib/meshes/hexmesh.h:124: ../lib/cinolib/include/cinolib/meshes/hexmesh.cpp:415:19: error: no member named 'update_hex_quality' in 'cinolib::Hexmesh<cinolib::Mesh_std_attributes, MV, ME, MF, MP>' this->update_hex_quality(); ~~~~ ^ 21 warnings and 2 errors generated. make: *** [export_helper.o] Error 1

I tried to search the function in 3D5378, But I can not find this function.
Any suggestion?
Thank you.

cut mesh

possible to cut mesh with set of 3d points on it.
if possible , example ??

Custom data in Tetmesh

Hi!
Is there a way to associate some metadata with tetrahedrons in Tetmesh?
E.g I have 2 Tetmeshes:
изображение
For each tetrahedron in tetmesh1 I need to store the same thermal conductivity which equals X, and for each tetrahedron in tetmesh2 I need to store the same thermal conductivity which equals Y.

How to use remesh_Botsch_Kobbelt_2004 without gl

Hi, I would like to use remesh_Botsch_Kobbelt_2004 to remesh a surface using the api. The issue I am having is that remesh_Botsch_Kobbelt_2004 seems to require a DrawableTrimesh which in turn is dependent on gl (my understanding is that gl is required for the GUI stuff, which I am not interested in). Is there a way of using remesh_Botsch_Kobbelt_2004 without needing gl?

Embed a polyline into a mesh

Thanks for putting this great library together @mlivesu!

I'm trying to adopt it to terrain modelling applications where curve-based mesh manipulation is a common task.

Consider this example. Given a terrain mesh and a curve in arbitrary 3d space:
image

Embed the curve into the mesh:
image

Do you have any suggestions on how to approach it?

Shadow casting question

Hello,

i would like to compute the covered area by a triangle mesh A on a second mesh B (made of either triangles or quads). Expected output is the covering ratio for each mesh B element.

I was wondering of your shadow casting (OpenGL) could be used for that need, and if yes how ?

thank you

compile error!

Win10, Qt5.10, vs2017, 02_base_app_quadmesh.pro

There are lots of compile error about GL.h(Windows Kits\10\Include\10.0.17134.0\um\gl\GL.h), I think it is a question.

Link errors

Hello,

I have linking errors (VS 2017, WIn10), when building examples, related to imgui lib:
Do you have an idea ?

Thank you

image

image

Undefined reference to `orient2d' / `orient3d'

Files predicates.h/cpp

Functions

       double orient2d(const double * pa, const double * pb, const double * pc);
       double orient3d(const double * pa, const double * pb, const double * pc, const double * pd);

are implemented if and only if CINOLIB_USES_EXACT_PREDICATES are not defined.

If CINOLIB_USES_EXACT_PREDICATES is defined, building errors occur : Undefined reference to orient2d' / orient3d'.

How to generate a cinolib?

I cannot find a CMakeLists.txt under cinolib to cmake/make and thus cannot build examples. How to generate **so and *.a of the cinolib? Thanks.

Example 22 : Core dump

Hello,

The most important example (remesher) fails:

22_remesher.pro main.cpp main.o Makefile remesher
csverma@blackhole:$ ./remesher ~/Disk/DataSets/Chair.off
new mesh 147428V / 444576E / 296384P
388249 edges longer than 0.0430667 were split.
142714 edges shorter than 0.02584 were collapsed.
250670 edge flip were performed to normalize vertex valence to 6
tangential smoothing
Remesh iteration [10.939885s]
1122279 edges longer than 0.0430667 were split.
231838 edges shorter than 0.02584 were collapsed.
remesher: ../../include/cinolib/meshes/abstract_polygonmesh.cpp:1347: uint cinolib::AbstractPolygonMesh<M, V, E, P>::poly_add(const std::vector<unsigned int, std::allocator >&) [with M = cinolib::Mesh_std_attributes; V = cinolib::Vert_std_attributes; E = cinolib::Edge_std_attributes; P = cinolib::Polygon_std_attributes; uint = unsigned int]: Assertion `poly_id(vlist)==-1' failed.
Aborted (core dumped)

Cut a volume mesh based on embedded level set

Hi, I would like to cut a volume mesh based a level set embedded on its vertices (at isovalue zero). To do so I have tried implementing it as seem bellow. While it compiles and runs without issues the mesh is not being split. I am probably missing something pretty trivial but I can’t seem figure out what it is. Hopefully you can shed some light on it.

std::vector<double> isovalues;
for (uint vid=1; vid<MyTetMesh.num_verts(); ++vid) {
    // Get coordinates of current point
    vec3d point = MyTetMesh.vert(vid);
    Point p(point.x(), point.y(), point.z());

    // Compute isovalue for current point
    double isovalue = my_function(p);
    isovalues.push_back(isovalue);
}

// Copy the field on the mesh?
ScalarField f = ScalarField(isovalues);
f.copy_to_mesh(MyTetMesh);

// Slice the mesh?
MeshSlicer ss;
ss.Z_thresh = 0;
ss.slice(MyTetMesh);

how to use the hex_transition_install function?

I want to achieve a simple subdivision schme on hexmesh. I think the ‘'hex_transition_install’' function may help me a lot.But i don't know which verts should be set to true in transition_verts. Is there any examples?

How to implement algorithms such as QEM

hi,I am trying to implement the QEM with cinolib, here is my question
I stored vid pair to collapse in the priority queue like this

struct contract {
	double cost, x, y, z;
	unit vid1, vid2;
}

I noticed that when deleting elements, the switch_id function will execute, causing the element id switch with last id, rendering the contract operation related to the last vid invalid. How can i solve this problem

All-hexahedral meshing?

Reading your paper Optimal Dual Schemes for Adaptive Grid Based Hexmeshing, it mentions that it's implemented in cinolib (in hex_transition_schemes.h), but does cinolib come "with batteries included" for obtaining a fully automatic hexmesh from, for example, a trimesh stored in OBJ? I'm asking this question because I found the repository used for the paper (https://github.com/cg3hci/Gen-Adapt-Ref-for-Hexmeshing) but however that code has quite a few external dependencies that I'd like to avoid.

If cinolib has all the necessary stuff, can you show some example for hexmeshing a triangle mesh? (I suppose the first step would be generating an adaptive grid, but that can be done with cinolib as well, can't it?

can we train an AI assisatnt for CAX?

like cinolib we could have more interfaces for CAX software, if we have interfaces, comments and the books, if we use nanogpt, maybe we could train an AI assistant?

Mesh duality: m_poly faces not planar nor perpendicular to the corresponding m_tet edge

First of all, thank you for this great project! It spared me a lot of trouble during my research.

I was investigating the duality of the meshes from the example 13, m_tet and m_poly.

I observed every edge from the m_tet mesh and its corresponding face from the m_poly mesh (shared face between edge points). I realized that:

  • the face is not perpendicular to the edge and
  • the face is not always planar

Is that a desired behaviour? Am I doing it wrong?

This is the code snippet I inserted into the example code for the purpose of this analysis:

    for (int i=0; i<m_tet.num_edges(); ++i)
      {
	std::vector<uint> vert_ids = m_tet.edge_vert_ids(i);
	uint fid = m_poly.poly_shared_face(vert_ids.at(0), vert_ids.at(1));

	std::vector<vec3d> edgev = m_tet.edge_verts(i);
	std::vector<vec3d> facev = m_poly.face_verts(fid);

	std::ofstream edgeout ("/tmp/cino/edge-" + std::to_string(i) + ".txt");
	for (auto v: edgev)
	    edgeout << v.x() << " " << v.y() << " " << v.z() << "\n";
	std::ofstream faceout ("/tmp/cino/face-" + std::to_string(i) + ".txt");
	for (auto v: facev)
	    faceout << v.x() << " " << v.y() << " " << v.z() << "\n";
      }

And some screenshots from Paraview:
cino2
cino3

Interactive Selection in the viewer

If the selected elements could be shown or hidden, The inside of the model could be seen. It is useful for some applications. Will cinolib add the mouse selction api or functions? For example

  1. Interactive rectangle selection of nodes or elements;
  2. Hiding the selected nodes and elements.
    image

information

Hello,
This repository was suggested to me by github and I just read the readme.
Looking at your research oriented list of mesh libraries, I wanted to suggest you CGOGN_2 and CGoGN_3 as "unified data structure for multiple dimension handling".
In fact, these libraries implement a mesh data structure (based on a theoretical model) that can handle 0D, 1D, 2D and 3D oriented open or closed manifolds whatever their discretization (polygons or polyhedrons). There is also a cgal package based on the same theoretical data model that can handle nD objects. A while ago we made some benchmarks also.

Imgui control hidden

I've compiled cinolub successfuly,but ImGUI control cannot be visible,What's wrong? other is OK

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.