tag:blogger.com,1999:blog-3285677929777490656.post5803431680171774847..comments2023-10-31T13:16:01.375+03:00Comments on Open CASCADE notes: Developing parallel applications with Open CASCADE. Part 1Roman Lyginhttp://www.blogger.com/profile/18338419158437898791noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-3285677929777490656.post-13421329883198968912014-06-21T01:51:57.749+04:002014-06-21T01:51:57.749+04:00Hi spiceboy,
Everything works just fine as expecte...Hi spiceboy,<br />Everything works just fine as expected. I used BRepPrimAPI_MakeBox to create myshape and save results to the .brep files:<br />TopoDS_Shape myShape = BRepPrimAPI_MakeBox (10., 20., 30.);<br />gp_Trsf aT1,aT2;<br />gp_Pnt p1;<br />gp_Pnt p2;<br />gp_Pnt p3;<br />p1.SetCoord(-20.620314,0.10587443,-146.79472);<br />p2.SetCoord(-435.57297,259.86014,1649.6030);<br />p3.SetCoord(-373.50610,246.80386,1852.6418);<br />aT1.SetTranslation(p1,p2);<br />myShape.Move(aT1);<br />BRepTools::Write (myShape, "C:/temp/myshape2.brep");<br />aT2.SetScale(p3,2.5);<br />BRepBuilderAPI_Transform Brep_Trsf(myShape,aT2,Standard_True);<br />TopoDS_Shape T_Shape = Brep_Trsf.Shape(); <br />BRepTools::Write (T_Shape, "C:/temp/t_shape.brep");<br /><br />So you might want to check your verification code.<br />Good luck.<br />RomanRoman Lyginhttps://www.blogger.com/profile/18338419158437898791noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-59593260848992650202014-06-20T12:25:15.529+04:002014-06-20T12:25:15.529+04:00Hi Roman,
I tried the following c...Hi Roman,<br /><br /> I tried the following code for the translation and scaling, The translation is working fine where as the the scaling operation is not working.. can u please tell me if anythings wrong with the code??<br /><br />gp_Trsf aT1,aT2;<br /> gp_Pnt p1;<br /> gp_Pnt p2;<br /> gp_Pnt p3;<br /> p1.SetCoord(-20.620314,0.10587443,-146.79472);<br /> p2.SetCoord(-435.57297,259.86014,1649.6030);<br /> p3.SetCoord(-373.50610,246.80386,1852.6418);<br /> aT1.SetTranslation(p1,p2);<br /> myShape.Move(aT1);<br /> aT2.SetScale(p3,2.5);<br /> BRepBuilderAPI_Transform Brep_Trsf(myShape,aT2,Standard_True);<br /> TopoDS_Shape T_Shape = Brep_Trsf.Shape();spiceboyhttps://www.blogger.com/profile/07162544428559855374noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-53293947027790446512014-06-19T13:21:10.800+04:002014-06-19T13:21:10.800+04:00Hi spiceboy,
Rotation and scaling is likewise, jus...Hi spiceboy,<br />Rotation and scaling is likewise, just call gp_Trsf::SetRotation() and ::SetScale() (or SetScaleFactor() if you need to combine it with other types of transformations).<br />Then apply BRepBuilderAPI_Transform.<br /><br />The latter will either apply simple transformation (TopoDS_Shape::Move()) or will reconstruct geometries (e.g. in the case of scaling).<br />Roman Lyginhttps://www.blogger.com/profile/18338419158437898791noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-6944742101293661082014-06-19T12:23:06.431+04:002014-06-19T12:23:06.431+04:00Hi Roman,
Sorry coudn't find ...Hi Roman,<br /><br /> Sorry coudn't find where to post last but not least, Similary can you tell me how to perform Rotation and scaling??spiceboyhttps://www.blogger.com/profile/07162544428559855374noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-80275058467147931372014-06-18T13:27:35.436+04:002014-06-18T13:27:35.436+04:00Well, not the best post to attach this comment to ...Well, not the best post to attach this comment to ;-). <br />gp_Trsf aT;<br />aT.SetTranslation (p1, p2);<br />TopoDS_Shape aShape1 = ...<br />aShape1.Move (aT);<br />Roman Lyginhttps://www.blogger.com/profile/18338419158437898791noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-42990868672610534852014-06-18T13:17:57.313+04:002014-06-18T13:17:57.313+04:00Hi Roman,
I have read two IGES Fi...Hi Roman,<br /><br /> I have read two IGES Files it s stored in Shape_1 and Shape_2 which is of type TopoDS_Shape. Right now i need to translate shape_1 from point A in shape one to point B in Shape_2, i found that gp_Trsf can be used for translation, But i am not getting how which function can be used to perform the functionlaity and how to apply the translation to TopoDS_Shape Shape_1????spiceboyhttps://www.blogger.com/profile/07162544428559855374noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-8086190924453011972009-08-20T19:04:00.203+04:002009-08-20T19:04:00.203+04:00Oh no! Intel compiler integrates well into VS2005,...Oh no! Intel compiler integrates well into VS2005, 2008 and likely 2003.Roman Lyginhttps://www.blogger.com/profile/18338419158437898791noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-68631789110392667152009-08-20T14:23:32.049+04:002009-08-20T14:23:32.049+04:00In the talk it seemed quite simple to exchange the...In the talk it seemed quite simple to exchange the compilers because the Intel compiler integrates nicely in Viusual Studio (but maybe only in VS2010?).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-22348266049033546632009-08-19T19:56:33.485+04:002009-08-19T19:56:33.485+04:00Hi Timo,
Glad to hear from you again. Well, I have...Hi Timo,<br />Glad to hear from you again. Well, I have often thought to give Intel compiler a try with Open CASCADE but did not come to this yet. It should involve conversion of VS projects to use Intel compiler and anyway would be a massive work that would require intensive regression testing. So, anyway it's huge effort and this could be in the best own OCC's interest to give it a try.<br />Thanks for a link although I don't understand German ;-). But there are many German readers here (more than from any other countries) so they would enjoy.<br /><br />Intel compiler is indeed known to produce generally faster code (esp on Intel architecture) but I have not myself tried it yet :-(. On my todo list though...Roman Lyginhttps://www.blogger.com/profile/18338419158437898791noreply@blogger.comtag:blogger.com,1999:blog-3285677929777490656.post-9300937860760830922009-08-19T15:39:45.269+04:002009-08-19T15:39:45.269+04:00Hello Roman,
in a german MSDN Tech Talk by Micros...Hello Roman,<br /><br />in a german MSDN Tech Talk by Microsoft and Intel about parallel programming, they told that before thinking about multi-threaded applications (which might be difficult) you can optimize the performance of your application just by compiling it with the Intel-compiler (Intel Parallel Composer) instead of the standard Visual Studio compiler, because the Intel compiler is able to do many optimizations, e.g. vectorization. Did you compile OCC with the Intel compiler and does it improve the performance?<br /><br />The link to the MSDN Tech Talk:<br />http://www.microsoft.com/germany/msdn/techtalk/videos/library.aspx?id=msdn_de_33301<br /><br />Regards,<br />TimoAnonymousnoreply@blogger.com