<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi, Hongjun<br><br>Now the code is changed for bodies to hold multiple volumes, it should be able to contain a body attribute. I haven't gone through this part of code yet. But I can work on it if you need.<br><br>Thanks for bringing up this topic.<br><br>Jane<br><br>--- On <b>Fri, 10/15/10, hongjun@mcs.anl.gov <i>&lt;hongjun@mcs.anl.gov&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: hongjun@mcs.anl.gov &lt;hongjun@mcs.anl.gov&gt;<br>Subject: Re: [cgma-dev] r4190 - in cgm/trunk: geom/OCC test<br>To: jiangtao_ma@yahoo.com<br>Cc: "Developer information for cgma" &lt;cgma-dev@lists.mcs.anl.gov&gt;<br>Date: Friday, October 15, 2010, 11:59 AM<br><br><div class="plainMail">Hello, Jane<br><br>I am developing parallel meshing and I need to distribute OCC geometry to multiple
 processors.<br>Since I am using Body as a unit of geometry distribution, I want to store distribution information as attributes to Body entities.<br>So, I made several import/export functions from/to memory buffer in "OCCQueryTool".<br><br>However, they are changed for "export_solid_model" function not to export parent Body entity of single Volume lump geometry<br>and I lose the attribute information assigned to Body entity.<br><br>So, can you change for single volume geometry to be exported with its parent Body attribute information?<br>Otherwise, do I have to use Volume and Surface as a distribution unit and assign the distribution information to Volume entity? <br><br>-----------------------------<br>Hong-Jun Kim<br>Post-doc researcher<br>9700 S. Cass Ave. B240/R2147<br>Argonne, IL 60439<br>630-252-4791<br><a ymailto="mailto:hongjun@mcs.anl.gov"
 href="/mc/compose?to=hongjun@mcs.anl.gov">hongjun@mcs.anl.gov</a><br>-----------------------------<br>----- "jiangtao ma" &lt;<a ymailto="mailto:jiangtao_ma@yahoo.com" href="/mc/compose?to=jiangtao_ma@yahoo.com">jiangtao_ma@yahoo.com</a>&gt; wrote:<br><br>&gt; Author: janehu<br>&gt; Date: 2010-10-04 09:47:41 -0500 (Mon, 04 Oct 2010)<br>&gt; New Revision: 4190<br>&gt; <br>&gt; Modified:<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCBody.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCBody.hpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCCurve.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCCurve.hpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCDrawTool.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCLump.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCLump.hpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCModifyEngine.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCPoint.hpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCQueryEngine.cpp<br>&gt;&nbsp; &nbsp;
 cgm/trunk/geom/OCC/OCCQueryEngine.hpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCShell.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCShell.hpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCSurface.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/geom/OCC/OCCSurface.hpp<br>&gt;&nbsp; &nbsp; cgm/trunk/test/Makefile.am<br>&gt;&nbsp; &nbsp; cgm/trunk/test/makept.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/test/modify.cpp<br>&gt;&nbsp; &nbsp; cgm/trunk/test/r_w.cpp<br>&gt; Log:<br>&gt; Body now has compound structure: can hold multiple surfaces, shells<br>&gt; and lumps. Single surface or shell or lump body will not have<br>&gt; TopoDS_Coumpound pointer in Body, and boolean operation is working<br>&gt; only on these kinds of bodies. The result of the boolean can be<br>&gt; compound.<br>&gt; So far, it passes all 12 tests under CGM/test, and it passed two more<br>&gt; tests in mcnp2cad: cone and fill1. Other tests are under investigation<br>&gt; now.<br>&gt; <br>&gt; Modified:
 cgm/trunk/geom/OCC/OCCBody.cpp<br>&gt; ===================================================================<br>&gt; --- cgm/trunk/geom/OCC/OCCBody.cpp&nbsp;&nbsp;&nbsp; 2010-10-04 13:09:41 UTC (rev 4189)<br>&gt; +++ cgm/trunk/geom/OCC/OCCBody.cpp&nbsp;&nbsp;&nbsp; 2010-10-04 14:47:41 UTC (rev 4190)<br>&gt; @@ -43,6 +43,7 @@<br>&gt;&nbsp; #include "TopTools_ListIteratorOfListOfShape.hxx"<br>&gt;&nbsp; #include "gp_Ax1.hxx"<br>&gt;&nbsp; #include "gp_Ax2.hxx"<br>&gt; +#include "gp_GTrsf.hxx"<br>&gt;&nbsp; #include "Bnd_Box.hxx"<br>&gt;&nbsp; #include "BRepBndLib.hxx"<br>&gt;&nbsp; #include "TopExp_Explorer.hxx"<br>&gt; @@ -52,75 +53,133 @@<br>&gt;&nbsp; #include "BRepGProp.hxx"<br>&gt;&nbsp; #include "Standard_Boolean.hxx"<br>&gt;&nbsp; #include "LocOpe_SplitShape.hxx"<br>&gt; +#include "TopoDS_Compound.hxx"<br>&gt; <br>&gt; //-------------------------------------------------------------------------<br>&gt;&nbsp; // Purpose&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;:
 A constructor with a list of lumps that are<br>&gt; attached.<br>&gt;&nbsp; //<br>&gt;&nbsp; // Special Notes :<br>&gt;&nbsp; //<br>&gt; <br>&gt; //-------------------------------------------------------------------------<br>&gt; -OCCBody::OCCBody(TopoDS_CompSolid *theShape, CubitBoolean<br>&gt; isSheetBody,<br>&gt; -&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;OCCSurface* surface, OCCShell* shell)<br>&gt; +OCCBody::OCCBody(TopoDS_Compound *theShape, <br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;OCCSurface* surface, OCCShell* shell, Lump* lump)<br>&gt;&nbsp; {<br>&gt;&nbsp; &nbsp; myTopoDSShape = theShape;<br>&gt; -&nbsp; IsSheetBody = isSheetBody; <br>&gt; -&nbsp; mySheetSurface = surface;<br>&gt; -&nbsp; myShell = shell;<br>&gt; +&nbsp; if (surface != NULL)<br>&gt; +&nbsp; &nbsp; mySheetSurfaces.append(surface);<br>&gt; +&nbsp; if( shell != NULL)<br>&gt; +&nbsp; &nbsp;
 myShells.append(shell);<br>&gt; +&nbsp; if (lump != NULL)<br>&gt; +&nbsp; &nbsp; myLumps.append(lump);<br>&gt;&nbsp; &nbsp; update_bounding_box();<br>&gt; +&nbsp; if (myTopoDSShape &amp;&amp; !myTopoDSShape-&gt;IsNull())<br>&gt; +&nbsp; &nbsp; assert(myTopoDSShape-&gt;ShapeType() == TopAbs_COMPOUND);<br>&gt;&nbsp; }<br>&gt;&nbsp; <br>&gt; -void OCCBody::set_sheet_surface(OCCSurface* surface)<br>&gt; +TopoDS_Compound* OCCBody::get_TopoDS_Shape()<br>&gt;&nbsp; {<br>&gt; -&nbsp; IsSheetBody = CUBIT_TRUE;<br>&gt; -&nbsp; mySheetSurface = surface;<br>&gt; -&nbsp; if(surface == NULL)<br>&gt; -&nbsp; &nbsp; IsSheetBody = CUBIT_FALSE;<br>&gt; +&nbsp; if (myTopoDSShape &amp;&amp; !myTopoDSShape-&gt;IsNull())<br></div></blockquote></td></tr></table><br>