<br>The following commands:<br><br> brick width 10<br> brick width 6 <br> body 2 move x 8<br> volume 1 2 size 1<br> mesh volume 1 2<br> imprint mesh body 1 2<br><br>cause a crash. The same commands without the meshing works fine.<br>
<br><br>The actual failure occurs in<br><br> void PartitionSurface::get_parents_virt( DLIList<TopologyBridge*>& result_list )<br><br>On the assert in the following code, tmp_list.size() is zero.<br><br> for( i = real_surf_shells.size(); i--; )<br>
{<br> tmp_list.clean_out();<br> real_surf_shells.get_and_step()->get_parents_virt( tmp_list );<br> assert(tmp_list.size() == 1);<br> real_surf_vols.append(tmp_list.get());<br> }<br> <br><br>A clue to the real problem may be revealed in the method called right before the assert:<br>
<br><br>void OCCShell::get_parents_virt( DLIList<TopologyBridge*>& parents ) <br><br> for(int i = 0; i < bodies->size(); i++)<br> {<br> body = bodies->get_and_step();<br> TopoDS_Compound* shape = body->get_TopoDS_Shape(); <---- added line<br>
if (shape == NULL) <---- added line<br> continue; <---- added line<br>
TopExp::MapShapesAndAncestors(*(body->get_TopoDS_Shape()),<br> TopAbs_SHELL, TopAbs_SOLID, M);<br> if (!M.Contains(*(get_TopoDS_Shell())))<br> continue;<br><br><br>Previously I added the lines to check if "body->get_TopoDS_Shape()"
was returning a NULL pointer. It seemingly fixed a number of problems. I wish I'd written down the actual things that
the change fixed. This might just be a band-aid that hides a deeper
problem but my tests run much better with the new code in place. Because the existing code doesn't check for a null pointer, there seems to be an assumption that it will never be null so the null pointer could be the real problem. I don't have enough understanding of the code to know what is correct.<br>
<br>Good Luck and thanks in advance,<br><br> - Boyd<br>