<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><hongjun@mcs.anl.gov></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 <hongjun@mcs.anl.gov><br>Subject: Re: [cgma-dev] r4190 - in cgm/trunk: geom/OCC test<br>To: jiangtao_ma@yahoo.com<br>Cc: "Developer information for cgma" <cgma-dev@lists.mcs.anl.gov><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" <<a ymailto="mailto:jiangtao_ma@yahoo.com" href="/mc/compose?to=jiangtao_ma@yahoo.com">jiangtao_ma@yahoo.com</a>> wrote:<br><br>> Author: janehu<br>> Date: 2010-10-04 09:47:41 -0500 (Mon, 04 Oct 2010)<br>> New Revision: 4190<br>> <br>> Modified:<br>> cgm/trunk/geom/OCC/OCCBody.cpp<br>> cgm/trunk/geom/OCC/OCCBody.hpp<br>> cgm/trunk/geom/OCC/OCCCurve.cpp<br>> cgm/trunk/geom/OCC/OCCCurve.hpp<br>> cgm/trunk/geom/OCC/OCCDrawTool.cpp<br>> cgm/trunk/geom/OCC/OCCLump.cpp<br>> cgm/trunk/geom/OCC/OCCLump.hpp<br>> cgm/trunk/geom/OCC/OCCModifyEngine.cpp<br>> cgm/trunk/geom/OCC/OCCPoint.hpp<br>> cgm/trunk/geom/OCC/OCCQueryEngine.cpp<br>>
cgm/trunk/geom/OCC/OCCQueryEngine.hpp<br>> cgm/trunk/geom/OCC/OCCShell.cpp<br>> cgm/trunk/geom/OCC/OCCShell.hpp<br>> cgm/trunk/geom/OCC/OCCSurface.cpp<br>> cgm/trunk/geom/OCC/OCCSurface.hpp<br>> cgm/trunk/test/Makefile.am<br>> cgm/trunk/test/makept.cpp<br>> cgm/trunk/test/modify.cpp<br>> cgm/trunk/test/r_w.cpp<br>> Log:<br>> Body now has compound structure: can hold multiple surfaces, shells<br>> and lumps. Single surface or shell or lump body will not have<br>> TopoDS_Coumpound pointer in Body, and boolean operation is working<br>> only on these kinds of bodies. The result of the boolean can be<br>> compound.<br>> So far, it passes all 12 tests under CGM/test, and it passed two more<br>> tests in mcnp2cad: cone and fill1. Other tests are under investigation<br>> now.<br>> <br>> Modified:
cgm/trunk/geom/OCC/OCCBody.cpp<br>> ===================================================================<br>> --- cgm/trunk/geom/OCC/OCCBody.cpp 2010-10-04 13:09:41 UTC (rev 4189)<br>> +++ cgm/trunk/geom/OCC/OCCBody.cpp 2010-10-04 14:47:41 UTC (rev 4190)<br>> @@ -43,6 +43,7 @@<br>> #include "TopTools_ListIteratorOfListOfShape.hxx"<br>> #include "gp_Ax1.hxx"<br>> #include "gp_Ax2.hxx"<br>> +#include "gp_GTrsf.hxx"<br>> #include "Bnd_Box.hxx"<br>> #include "BRepBndLib.hxx"<br>> #include "TopExp_Explorer.hxx"<br>> @@ -52,75 +53,133 @@<br>> #include "BRepGProp.hxx"<br>> #include "Standard_Boolean.hxx"<br>> #include "LocOpe_SplitShape.hxx"<br>> +#include "TopoDS_Compound.hxx"<br>> <br>> //-------------------------------------------------------------------------<br>> // Purpose :
A constructor with a list of lumps that are<br>> attached.<br>> //<br>> // Special Notes :<br>> //<br>> <br>> //-------------------------------------------------------------------------<br>> -OCCBody::OCCBody(TopoDS_CompSolid *theShape, CubitBoolean<br>> isSheetBody,<br>> - OCCSurface* surface, OCCShell* shell)<br>> +OCCBody::OCCBody(TopoDS_Compound *theShape, <br>> + OCCSurface* surface, OCCShell* shell, Lump* lump)<br>> {<br>> myTopoDSShape = theShape;<br>> - IsSheetBody = isSheetBody; <br>> - mySheetSurface = surface;<br>> - myShell = shell;<br>> + if (surface != NULL)<br>> + mySheetSurfaces.append(surface);<br>> + if( shell != NULL)<br>> +
myShells.append(shell);<br>> + if (lump != NULL)<br>> + myLumps.append(lump);<br>> update_bounding_box();<br>> + if (myTopoDSShape && !myTopoDSShape->IsNull())<br>> + assert(myTopoDSShape->ShapeType() == TopAbs_COMPOUND);<br>> }<br>> <br>> -void OCCBody::set_sheet_surface(OCCSurface* surface)<br>> +TopoDS_Compound* OCCBody::get_TopoDS_Shape()<br>> {<br>> - IsSheetBody = CUBIT_TRUE;<br>> - mySheetSurface = surface;<br>> - if(surface == NULL)<br>> - IsSheetBody = CUBIT_FALSE;<br>> + if (myTopoDSShape && !myTopoDSShape->IsNull())<br></div></blockquote></td></tr></table><br>