<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Hi Jane,<br>Thank you for looking into this.<br>So I verified that with this fix, the output coordinates in testgeom_occ are the same with the one from testgeom. <br>This is "hardcoded", so all iges files read by occ will be "converted" to M.<br><br>What field in igs file shows that the unit is M? Or is MM? I am still confused who does the conversion to MM, OCC igs reader ?<br><br>Anyway, this has implications for MOAB too. With the current code, moab will convert the igs file to a faceted model, and in case of OCC it takes forever to facet (I think we have a unit issue there, as we use an absolute value for facet size, not a relative size of model)<br><br>I mean, if you do "mbsize cducts.igs" for mbsize built with OCC, it will not finish in more than 3 minutes I waited (I had to kill the process). I need to try after this fix.<br>While mbsize cducts.igs for moab built with cubit, finishes almost instantly.<br><br>Again, mbsize <>.igs will do a faceting of geometry first, then will output the size of the (faceted) mesh.<br><br>Thanks,<br>Iulian<br><br><hr id="zwchr"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">I need to code for reading the unit of iges, and set up the unit in the cgm.<br><br>For now, if you already knows the unit of the iges files, here is meter, then just add the following lines to OCCQueryEngine.cpp should work. Please let me know if it temporarily solves your problem.<br>
<br>--- OCCQueryEngine.cpp (revision 5293)<br>+++ OCCQueryEngine.cpp (working copy)<br>@@ -32,6 +32,7 @@<br> #include "gp_Ax2.hxx"<br> #include "Geom_Surface.hxx"<br> #include "Geom_Curve.hxx"<br>
+#include "Interface_Static.hxx"<br> #include "BRepBuilderAPI.hxx"<br> #include "BRepBuilderAPI_Transform.hxx"<br> #include "BRepBuilderAPI_GTransform.hxx"<br>@@ -1491,6 +1492,9 @@<br>
else if(strcmp(file_type, "IGES") == 0)<br> {<br> IGESControl_Reader reader;<br>+ char* name = "xstep.cascade.unit";<br>+ char* val = "M";<br>+ Interface_Static::SetCVal (name, val);<br>
const Standard_CString string1 = file_name;<br> IFSelect_ReturnStatus stat = reader.ReadFile( string1);<br> if (stat != IFSelect_RetDone)<br><br>Thanks.<br><br>Jane<br><br><br><div class="gmail_quote">On Wed, Jan 18, 2012 at 10:21 AM, Jane Hu <span dir="ltr"><<a href="mailto:janejhu@gmail.com" target="_blank">janejhu@gmail.com</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;">Hi, Iulian,<br><br>Opencascade internally assumes that OCC models are measured in millimeters, so if the model is given in unit M (meter), it'll be changed to 1000times larger and uses MM(millimeter) in OCC. I am now checking on the code, and see if we can do something on it.<span class="HOEnZb"><font color="#888888"><br>
<br>Jane</font></span><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Wed, Jan 18, 2012 at 9:14 AM, Iulian Grindeanu <span dir="ltr"><<a href="mailto:iulian@mcs.anl.gov" target="_blank">iulian@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: 12pt; font-family: Times New Roman;">Hi Jane,<br>Dan Le found this problem with respect to igs reader:<br>Please see the attached files.<br>testgeom.cc is a version of CGM/itaps/testgeom.cc file, which also prints the coordinates of all the vertices from the model.<br>
iges format is supported by OCC and Acis/cubit engines.<br>Still, the coordinates of the vertices are 1000 larger when occ is used.<br>So if you run this test<br>testgeom cduct.igs<br>in Cubit based cgm or<br>testgeom_occ cduct.igs <br>
in OCC based cgm,<br>you get different results (1000 times bigger in occ case). It seems that in cubit case, we do a conversion to sat format, first.<br><br>ITAPS GEOMETRY INTERFACE TEST PROGRAM:<br><br> gLoad: Reading STEP/IGES file '/home/iulian/tmp/test_lorenzo/cduct.igs'...<br>
Model conversion succeeded: /tmp/CBT.Hoo5yc.sat<br>Read 6 ACIS Entities from the input file<br><br><br>Constructed 6 Volumes: 1 to 6<br>Model contents: <br>vertices: 24<br>edges: 24<br>faces: 6<br>regions: 6<br>vertex index 0 : 0 0 0<br>
vertex index 1 : 0 1 0<br>vertex index 2 : 10.5 15 0<br>vertex index 3 : 11.5 15 0<br>...<br><br> testgeom_occ cduct.igs <br>Geometry engine set to: OpenCascade 6.3<br><br><br>ITAPS GEOMETRY INTERFACE TEST PROGRAM:<br><br>
gLoad: Total number of loaded entities : 78.<br><br>Constructed 6 Volumes: 1 to 6<br>Model contents: <br>vertices: 24<br>edges: 24<br>faces: 6<br>regions: 6<br>vertex index 0 : 0 0 0<br>vertex index 1 : 0 1000 0<br>vertex index 2 : 10500 15000 0<br>
vertex index 3 : 11500 15000 0<br>...<br><br><br><br>Can you please tell me what we should do to get similar results ?<br><br>Thanks,<br>Iulian<br><br></div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</blockquote><br></div></body></html>