Revision: 57846
          http://sourceforge.net/p/brlcad/code/57846
Author:   starseeker
Date:     2013-09-23 19:59:44 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
Make generic axis2_placement_3d function and make identity a special case that 
calls it.

Modified Paths:
--------------
    brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp

Modified: brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp
===================================================================
--- brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp      2013-09-23 
19:53:31 UTC (rev 57845)
+++ brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp      2013-09-23 
19:59:44 UTC (rev 57846)
@@ -128,13 +128,16 @@
 
 /* TODO - generic, move to the internal utility file */
 STEPentity *
-Identity_AXIS2_PLACEMENT_3D(Registry *registry, InstMgr *instance_list) {
+Create_AXIS2_PLACEMENT_3D(fastf_t pt_x, fastf_t pt_y, fastf_t pt_z,
+       fastf_t d1_x, fastf_t d1_y, fastf_t d1_z,
+       fastf_t d2_x, fastf_t d2_y, fastf_t d2_z,
+       Registry *registry, InstMgr *instance_list) {
     SdaiCartesian_point *pnt = (SdaiCartesian_point 
*)registry->ObjCreate("CARTESIAN_POINT");
-    XYZ_to_Cartesian_point(0.0, 0.0, 0.0, pnt);
+    XYZ_to_Cartesian_point(pt_x, pt_y, pt_z, pnt);
     SdaiDirection *axis = (SdaiDirection *)registry->ObjCreate("DIRECTION");
-    XYZ_to_Direction(0.0, 0.0, 1.0, axis);
+    XYZ_to_Direction(d1_x, d1_y, d1_z, axis);
     SdaiDirection *ref = (SdaiDirection *)registry->ObjCreate("DIRECTION");
-    XYZ_to_Direction(1.0, 0.0, 0.0, ref);
+    XYZ_to_Direction(d2_x, d2_y, d2_z, ref);
     SdaiAxis2_placement_3d *placement = (SdaiAxis2_placement_3d 
*)registry->ObjCreate("AXIS2_PLACEMENT_3D");
     placement->location_(pnt);
     placement->axis_(axis);
@@ -146,6 +149,11 @@
     return (STEPentity *)placement;
 }
 
+STEPentity *
+Identity_AXIS2_PLACEMENT_3D(Registry *registry, InstMgr *instance_list) {
+    return Create_AXIS2_PLACEMENT_3D(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 
0.0, registry, instance_list);
+}
+
 void
 Add_Assembly_Product(struct directory *dp, struct db_i *dbip, struct bu_ptbl 
*children,
        std::map<struct directory *, STEPentity *> *comb_to_step,

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to