You may try merge_cubit13.1 branch, this has some minor function signature's changes, it shouldn't affect the result of running testcases in occ. <br><br>Can you double check if a new_body is created in the copy_body process? I suspect that the problem is still in the copy_body place, where it didn't find underlining TopoDS_Shape. Then it could be just related to the OS, which may be a bug there.<br>
<br>Jane<br><br><div class="gmail_quote">On Mon, May 21, 2012 at 12:22 PM, Rajeev Jain <span dir="ltr"><<a href="mailto:jain@mcs.anl.gov" target="_blank">jain@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div><span style="font-size:14px"><div>Thanks Jane for looking into this, we made some progress, I made the changes you made to cgm repo version, I'm using CGM repo version with OCC-6.5 not the merge-cubit13.1 branch - should I use this branch instead?</div>
<div><br></div><div>We made some progress with the change you made the error is now on line 6249 instead of 6233 in file iGeom_CGMA.cc, which is the subtract operation, the copy operation seems to have gone through, please see debugger o/p below:</div>
<div><br></div><div>(gdb) r</div><div>Starting program: /Users/rajeevjain/cgm/itaps/testgeom_occ </div><div>Reading symbols for shared libraries ++++++++++++++++++++++++++++++..................................... done</div>
<div class="im"><div>Using default input file: ./../test/LeverArm.brep</div><div>Geometry engine set to: OpenCascade
6.5</div><div><br></div><div><br></div><div>ITAPS GEOMETRY INTERFACE TEST PROGRAM:</div><div><br></div><div> gLoad: </div><div>Constructed 1 Volume: 1</div><div>Model contents: </div><div>vertices: 99</div><div>edges: 159</div>
<div>faces: 63</div><div>regions: 1</div><div>Success</div><div> tags: Tags defined on model: GLOBAL_ID, NAME</div><div>Success</div><div> gentity sets: Success</div><div> topology adjacencies: Success</div><div> construct: Created swept volume 4</div>
<div>Updated volume 3</div><div>Success</div><div> primitives: Success</div><div> transforms: Success</div><div><br></div><div>Program received signal EXC_BAD_ACCESS, Could not access memory.</div></div><div>Reason: 13 at address: 0x0000000000000000</div>
<div>0x00000001041f8edf in Handle_Standard_Transient::Assign ()</div><div>(gdb) bt</div><div>#0 0x00000001041f8edf in
Handle_Standard_Transient::Assign ()</div><div>#1 0x00000001031ee1e4 in BRepBuilderAPI_ModifyShape::DoModif ()</div><div>#2 0x00000001031e46c0 in BRepBuilderAPI_Copy::BRepBuilderAPI_Copy ()</div><div>#3 0x00000001000b286d in OCCModifyEngine::get_shape_list (this=0x104e04b70, BodySM_list=@0x7fff5fbff4f0, shape_list=@0x7fff5fbff318, is_volume=@0x7fff5fbff2f8, keep_old=true, b_boxes=0x104e8d3f0) at OCCModifyEngine.cpp:3535</div>
<div>#4 0x000000010007e792 in OCCModifyEngine::subtract (this=0x104e04b70, tool_body_list=@0x7fff5fbff4f0, from_bodies=@0x7fff5fbff4d8, new_bodies=@0x7fff5fbff480, imprint=false, keep_old=false) at OCCModifyEngine.cpp:2212</div>
<div>#5 0x00000001004a4cec in GeometryModifyTool::subtract (this=0x104e03280, tool_body_list=@0x7fff5fbff608, from_bodies=@0x7fff5fbff6f0, new_bodies=@0x7fff5fbff6d8, imprint=false, keep_old=false) at GeometryModifyTool.cpp:6368</div>
<div>#6 0x00000001004a51de in
GeometryModifyTool::subtract (this=0x104e03280, tool_body=0x104e8cb30, from_bodies=@0x7fff5fbff6f0, new_bodies=@0x7fff5fbff6d8, imprint=false, keep_old=false) at GeometryModifyTool.cpp:6305</div><div>#7 0x0000000100028f21 in iGeom_subtractEnts (instance=0x10085e8c0, blank=0x104e7fe50, tool=0x104e7ef40, geom_entity=0x7fff5fbff8b0, err=0x7fff5fbff8cc) at iGeom_CGMA.cc:6249</div>
<div>#8 0x0000000100006231 in booleans_test (geom=0x10085e8c0) at testgeom.cc:1136</div><div>#9 0x000000010000e878 in main (argc=1, argv=0x7fff5fbffb78) at testgeom.cc:239</div><div>(gdb) list</div><div>129<span style="white-space:pre-wrap"> </span>}</div>
<div>130<span style="white-space:pre-wrap"> </span></div><div>131<span style="white-space:pre-wrap"> </span>int main( int argc, char *argv[] )</div><div>132<span style="white-space:pre-wrap"> </span>{</div><div>133<span style="white-space:pre-wrap"> </span> // Check command line arg</div>
<div>134<span style="white-space:pre-wrap"> </span> #ifdef FORCE_OCC</div><div>135<span style="white-space:pre-wrap"> </span> #ifndef HAVE_OCC</div><div>136<span style="white-space:pre-wrap"> </span> #error "Cannot force use of OCC w/out OCC support"</div>
<div>137<span style="white-space:pre-wrap"> </span> #endif</div><div>138<span style="white-space:pre-wrap"> </span> std::string filename = STRINGIFY(SRCDIR) "/../test/LeverArm.brep";</div></span></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><font style="font-family:arial,helvetica,sans-serif" size="2">Rajeev</font><br><br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px">
<div style="font-size:10pt;font-family:arial,helvetica,sans-serif"> <div style="font-size:12pt;font-family:'times new roman','new york',times,serif"> <div dir="ltr"> <font face="Arial"> <hr size="1"> <b><span style="font-weight:bold">From:</span></b> Jane Hu <<a href="mailto:janejhu@gmail.com" target="_blank">janejhu@gmail.com</a>><br>
<b><span style="font-weight:bold">To:</span></b> Rajeev Jain <<a href="mailto:jain@mcs.anl.gov" target="_blank">jain@mcs.anl.gov</a>> <br><b><span style="font-weight:bold">Cc:</span></b> CGMA Development <<a href="mailto:cgma-dev@mcs.anl.gov" target="_blank">cgma-dev@mcs.anl.gov</a>> <br>
<b><span style="font-weight:bold">Sent:</span></b> Monday, May 21, 2012 10:11 AM<br> <b><span style="font-weight:bold">Subject:</span></b> Re: testgeom_occ<br> </font> </div><div><div class="h5"> <br>
<div>Hi, Rajeev:<br><br>I don't know exactly what's wrong with the Mac OS, I double checked that if the new_body is null, theCS pointer should not be null. However, I added a safety check on it just now. Can you double check to see if it works this time?<br>
<br>Jane<br><br><div>On Fri, May 18, 2012 at 3:34 PM, Rajeev Jain <span dir="ltr"><<a rel="nofollow" href="mailto:jain@mcs.anl.gov" target="_blank">jain@mcs.anl.gov</a>></span> wrote:<br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div><span><span style="font-size:14px">testgeom_occ on Mac OSX fails, when in copy_body routine, the call to IsBound fails:</span></span></div><div>
<span><span style="font-size:14px"> if(!new_body && OCCQueryEngine::instance()->OCCMap->IsBound(*theCS))</span></span></div></div></div></blockquote></div><br>
</div><br><br> </div></div></div> </div> </blockquote></div> </div></div></blockquote></div><br>