Hello Madam or Sir,
I am the user of OpenMesh, and I want ask some questions about the parallel code with OpenMesh, exactly, the parallel code is based on OpenMP on the VS2013.
The first question: When I use the OpenMP on the VS2013 to speed up the program which write with OpenMesh, for example, I add the code: #pragma omp parallel for num_threads(7) , just like the following:
and the errors follow, and I do not know why.
and the second question: Could the code with iterator of OpenMesh be paralleled by OpenMP just like " for (TriMesh::FaceIter f_it = mesh.faces_begin(); f_it != mesh.faces_end(); f_it++) " in the above picture? or How can I parallel the code with iterator of OpenMesh?
Thank you for your time! And I am looking forward to your reply.
Sincerely
LuWang
Hi,
OpenMesh has implemented the functionalities to s/r custom property of
vector<T> in
OpenMesh/Core/IO/SR_binary_vector_of_fundamentals.inl.
However it seems to expect the size to be known in advance when restoring.
Is there a way to restore the size dynamically?
I think maybe it's better to store the size as well?
Kind regards
Hey Alex,
Sorry to bring this email thread back from the dead. Any chance you could
publish this latest work to pip?
Best regards,
Jesse
On Wed, Nov 13, 2019 at 5:35 PM Dielen, Alexander Michael <
alexander.dielen(a)rwth-aachen.de> wrote:
> Hi,
>
> our intention was to hide the StatusInfo class from python, but this made
> it impossible to mark vertices as locked.
>
> I added a way to specify locked vertices like this:
>
>
> mesh = om.read_trimesh("bunny.stl")
>
> for vh in mesh.vertices():
> if mesh.point(vh)[2] > 0:
> mesh.set_vertex_property("locked", vh, True)
>
> decimater = om.TriMeshDecimater(mesh)
> mod = om.TriMeshModQuadricHandle()
> decimater.add(mod)
> decimater.initialize()
>
> decimater.decimate(10000, locked_vertex_propname="locked")
>
> mesh.garbage_collection()
> om.write_mesh("decimated_bunny.ply", mesh)
>
>
> Best regards,
> Alex
>
> ------------------------------
> *From:* Jesse Vander Does <jvanderdoes(a)gmail.com>
> *Sent:* Thursday, October 31, 2019 4:59:51 PM
> *To:* Dielen, Alexander Michael
> *Cc:* openmesh(a)lists.rwth-aachen.de
> *Subject:* Re: [OpenMesh] Python - Bulk Add Points
>
> Wow, thank you! That worked great. Those methods have made it really easy
> to move between OpenMesh and TriMesh (https://trimsh.org/) which provides
> more import options and a scene graph. Combining these two libraries really
> makes for a very powerful python API.
>
> My goal is to use OpenMesh for decimation. The next thing I bumped into
> was that the python API appears to have removed
> <https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python/commit/ec…>
> the ability to "lock
> <https://www.openmesh.org/media/Documentations/OpenMesh-6.1-Documentation/a0…>"
> vertices. Do you know if there is a new way of doing so or why that
> functionality was removed?
> <https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python/commit/ec…>
>
> Best regards,
> Jesse
>
>
>
> On Thu, Oct 31, 2019 at 5:15 AM Dielen, Alexander Michael <
> alexander.dielen(a)rwth-aachen.de> wrote:
>
>> Hi,
>>
>> I added the functions Isaak mentioned earlier. If you build from source,
>> there are now three ways to add vertices and faces to a mesh using numpy
>> arrays:
>>
>> 1. Using the mesh constructor as described by Isaak: mesh =
>> om.TriMesh(points, face_vertex_indices). Here points is an array of vertex
>> coordinates with shape (n, 3) and face_vertex_indices is an array of vertex
>> indices with shape (m, 3) where each row defines a triangle.
>>
>> 2. By passing an array of vertex coordinates to mesh.add_vertices() or by
>> passing an array of face_vertex_indices to mesh.add_faces().
>>
>> 3. By first calling mesh.resize_points(n) and then directly modifying the
>> array returned by mesh.points().
>>
>> Best regards,
>> Alex
>>
>>
>> On 30. Oct 2019, at 18:15, Jesse Vander Does <jvanderdoes(a)gmail.com>
>> wrote:
>>
>> Hello OpenMesh,
>>
>> I would like to be able to quickly copy a numpy array of vertices and
>> faces into a TriMesh. After some digging I found this task
>> https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python/issues/18 which
>> suggests assigning multiple points by doing `m.points()[:] = p`. I can't,
>> however, figure out how to resize the points array without using
>> `add_point` or `new_vertex`.
>>
>> Any help would be much appreciated.
>>
>> As an aside, it would be great to be able to post and comment on issues.
>> Is there a reason the project is managed such that gitlab project is
>> readonly?
>>
>> Best regards,
>> --
>> Jesse Vander Does
>> 424-465-0285 | jvanderdoes(a)gmail.com
>> _______________________________________________
>> OpenMesh mailing list -- openmesh(a)lists.rwth-aachen.de
>> To unsubscribe send an email to openmesh-leave(a)lists.rwth-aachen.de
>> https://lists.rwth-aachen.de/postorius/lists/openmesh.lists.rwth-aachen.de
>>
>>
>>
>
> --
> Jesse Vander Does
> 424-465-0285 | jvanderdoes(a)gmail.com
>
--
Jesse Vander Does
424-465-0285 | jvanderdoes(a)gmail.com