Hi Martin, actually it's the other way around, this is the proof that they are, at least the endcap and the outer wall, from what I can see from the screenshot - I can't really see the inner surface. vmtksurfaceremeshing looks at the values of a user-provided cell id array (usually it's call CellEntityIds) and preserves the solid edges between regions with different cell ids. So what you need for preserving the sharp transition is to build a cell id array: just instantiate a vtkIntArray or any other integer type - even a vtkUnsignedCharArray will do since you'll have a few entities - and fill it with different values for each entity, in this case outer wall, inner wall and each of the endcaps (usually starting from 1 onwards - I keep 0 for easily differentiating the volume cells), where each value is associated to a cell id. Then set it using, e.g. surface->GetCellData()->AddArray(entityIdsArray)l; Don't forget to assign a name to the array (e.g. CellEntityIds), so you can specify it at the pipe level. At this point you're done, just add -entityidsarray CellEntityIds to vmtksurfacemeshing and the final mesh will preserve the edge between entities.
Now, to verify surface connectedness, open the surface in Paraview and apply the Connectivity filter. The surface will color with different colors for each connected component (this is not bulletproof in case the inner surface is only partially connected). The bulletproof way is to use the FeatureEdges filter and extract BoundaryEdges only: there shouldn't be any. Hope this helps Luca On Sep 25, 2012, at 10:38 AM, Martin Sandve Alnæs wrote: > On 24 September 2012 17:03, Luca Antiga <luca.ant...@gmail.com> wrote: >> Hi Martin, >> I assume the inner surface is topologically connected to the rest, right? > > I'm actually wondering now if the surfaces are not properly connected. > The sharp boundaries between the inner/outer surfaces and the > endcaps are not properly preserved when doing > > vmtksurfaceremeshing -ifile inp_cp.vtp -ofile inp_cp_rm.vtp > -elementsizemode edgelength -edgelength 0.01 > -preserveboundary 1 > > as seen in the attached image. Could that be the result of missing > topological connection? > > Martin > > >> One quick thing you could do is to verify the orientation of the normals in >> the inner surface with ad-hoc code and flip them in case they are reversed, >> this assuming that you have an easy way to tell whether you are on the >> inner surface or not. >> >> Just my 2 cents. >> >> Luca >> >> >> >> >> On Sep 24, 2012, at 4:32 PM, Martin Sandve Alnæs wrote: >> >> Thanks! Actually, it looks like the normals at the inner boundary >> are pointing the wrong way, into the "donut volume" and not into >> the hole as they should. The inner and outer boundaries are both >> the results of separate surface remeshing operations. >> >> Martin >> >> >> On 24 September 2012 15:51, Luca Antiga <luca.ant...@gmail.com> wrote: >> >> Hi Martin, >> >> the orientation shouldn't matter as long as the normals filter >> >> can orient the normals outwards automatically, which is trivial >> >> for a closed surface but might be not trivial for a complex one >> >> (or downright impossible, but it shouldn't be your case). >> >> >> Try to run vmtksurfacenormals and see what comes out of that >> >> with Paraview (using the Glyph filter to visualize normals). The >> >> normals should be all outwards, if they're not then maybe that's >> >> the issue. >> >> >> Best, >> >> >> Luca >> >> >> >> >> On Sep 24, 2012, at 3:46 PM, Martin Sandve Alnæs wrote: >> >> >> Hi Luca, >> >> we have some issues with the meshing though. Karen is testing it. >> >> >> The remeshed surface looks fine, but it may seem that the >> >> mesh generation misinterprets it. Sometimes it crashes, >> >> some times the result is weird. >> >> >> Do the triangle orientations in the endcaps triangulation >> >> matter? It doesn't look like it matters in the annular endcaps >> >> mode code that I used as my starting point. >> >> >> Martin >> >> >> >> On 24 September 2012 15:27, Luca Antiga <luca.ant...@gmail.com> wrote: >> >> Hi Martin, >> >> this is awsome! Looking forward to your very welcome contribution. >> >> Nice job >> >> >> Luca >> >> >> >> On Sep 21, 2012, at 1:38 PM, Martin Sandve Alnæs wrote: >> >> >> Hi Roman, >> >> thanks for the reply. As you suggested I looked into vtk meshing >> >> possibilities, and I ended up using >> >> vtkPolygon::NonDegenerateTriangulate(). I will merge my vmtk >> >> extensions into vmtk when it's been tested properly. Attached is an >> >> image of the result for the curious. Notice the hole in the middle, >> >> which is a canal going through to the other side. >> >> >> Martin >> >> >> On 18 September 2012 15:35, Dr. Roman Grothausmann >> >> <grothausmann.ro...@mh-hannover.de> wrote: >> >> Hi Martin, >> >> >> >> Could You post an image visualizing Your structure? >> >> One idea that came into my mind would be to use vtkDelauney3D that You could >> >> use to generate a convex hull, to cap Your structure. Though, depending on >> >> Your structures, You might need to find a way to remove parts of the convex >> >> hull, that are not needed for capping. >> >> >> Roman >> >> >> >> On 18/09/12 11:50, Martin Sandve Alnćs wrote: >> >> >> Hi! >> >> I'd like to close the endcaps of a geometry that is topologically like >> >> an extruded donut, but where the outer boundary is a non-convex >> >> butterfly-like polygon. The annular endcaps approach does not work for >> >> this case. I have some slighly cumbersome ideas involving meshing >> >> these endcaps in external software. But I'm wondering if anyone has a >> >> good alternative approach within vmtk? >> >> >> -- >> >> Martin >> >> >> >> ------------------------------------------------------------------------------ >> >> Live Security Virtual Conference >> >> Exclusive live event will cover all the ways today's security and >> >> threat landscape has changed and how IT managers can respond. Discussions >> >> will include endpoint security, mobile security and the latest in malware >> >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> >> _______________________________________________ >> >> vmtk-users mailing list >> >> vmtk-users@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/vmtk-users >> >> >> >> -- >> >> Dr. Roman Grothausmann >> >> >> Tomographie und Digitale Bildverarbeitung >> >> Tomography and Digital Image Analysis >> >> >> Institut für Funktionelle und Angewandte Anatomie, OE 4120 >> >> Medizinische Hochschule Hannover >> >> Carl-Neuberg-Str. 1 >> >> 30625 Hannover >> >> >> Tel. +49 511 532-9574 >> >> <resized.png>------------------------------------------------------------------------------ >> >> Got visibility? >> >> Most devs has no idea what their production app looks like. >> >> Find out how fast your code is with AppDynamics Lite. >> >> http://ad.doubleclick.net/clk;262219671;13503038;y? >> >> http://info.appdynamics.com/FreeJavaPerformanceDownload.html_______________________________________________ >> >> vmtk-users mailing list >> >> vmtk-users@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/vmtk-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> vmtk-users mailing list >> vmtk-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/vmtk-users >> >> > <resized.png>------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ > vmtk-users mailing list > vmtk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/vmtk-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ vmtk-users mailing list vmtk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vmtk-users