[cgma-dev] r3501 - in cgm/branches/merge-cubit12/geom: . ACIS_SRC ACIS_SRC/gtcAttrib/src facet

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Jan 28 11:10:24 CST 2010


Author: kraftche
Date: 2010-01-28 11:10:23 -0600 (Thu, 28 Jan 2010)
New Revision: 3501

Modified:
   cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp
   cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.hpp
   cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.cpp
   cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.hpp
   cgm/branches/merge-cubit12/geom/ACIS_SRC/gtcAttrib/src/attrib_gtc.C
   cgm/branches/merge-cubit12/geom/GfxPreview.cpp
   cgm/branches/merge-cubit12/geom/facet/FacetModifyEngine.cpp
Log:
fix build issues

Modified: cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp	2010-01-28 07:11:34 UTC (rev 3500)
+++ cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp	2010-01-28 17:10:23 UTC (rev 3501)
@@ -4776,9 +4776,10 @@
   // Return the FACE
   return new_BODY_ptr->lump()->shell()->first_face();
 }
-#endif
 
+#else
 
+
 FACE* AcisModifyEngine::make_type_FACE( FACE *FACE_ptr, CubitBox *limit_box_ptr ) const
 {
   
@@ -5019,6 +5020,8 @@
   }
 } 
 
+#endif
+
 // This function will create a plane face using the info
 // from the existing plane.  It is actually a face or sheet
 // body that will result from this. The new face or sheet
@@ -14090,6 +14093,12 @@
     
     if (expand)
     {
+#if CUBIT_ACIS_VERSION < 1900
+      PRINT_ERROR("Imprint expanded feature not available w/out ACIS 19 or newer'\n"
+                  "%s:%d\n",__FILE__,__LINE__);
+      api_delent( trim_tool );
+      return CUBIT_FAILURE;
+#else
       SPAposition trim_tool_box_high(0,0,0);
       SPAposition trim_tool_box_low(0,0,0);
     
@@ -14105,6 +14114,7 @@
         PRINT_ERROR( "Unable to extend the trimming surface\n" );
         return CUBIT_FAILURE;
       }
+#endif
     }
     
     ENTITY_LIST trim_tool_faces;
@@ -19412,6 +19422,12 @@
 CubitStatus AcisModifyEngine::tighten_gaps_in_body(BODY*& body,
                              const double& desired_gap_tightness)const
 {
+#if CUBIT_ACIS_VERSION < 1900
+  PRINT_ERROR("api_tighten_gaps not available w/out ACIS 19.\n"
+              "%s:%d\n", __FILE__, __LINE__ );
+  return CUBIT_FAILURE;
+#else
+
   // Make the careful option OFF to enable failsafe behavior.
   // Note:  By default the "careful" option is already OFF
   option_header *careful_opt = find_option("careful");
@@ -19437,6 +19453,7 @@
   //handle_problems_reported_by_outcome(result_of_gap_tightening);
 
   return CUBIT_SUCCESS;
+#endif
 }
 
 bool AcisModifyEngine::handle_fatal_problem_reported_by_outcome(const outcome& api_outcome)const

Modified: cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.hpp
===================================================================
--- cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.hpp	2010-01-28 07:11:34 UTC (rev 3500)
+++ cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.hpp	2010-01-28 17:10:23 UTC (rev 3501)
@@ -2044,9 +2044,6 @@
   CubitStatus imprint( BODY *BODY_ptr, FACE *FACE_ptr, EDGE *EDGE_ptr ) const;
     //- Imprint given FACE with given EDGE.  BODY_ptr is BODY that FACE_ptr is on.
 
-  EDGE* project_EDGE( EDGE* EDGE_in_ptr, FACE* FACE_ptr, bool print_error = true ) const;
-    //- Projects a EDGE to a FACE returning the newly created EDGE
-
 //HEADER- Functions for geometry and topology queries.
 
   CubitBoolean BODYs_interfering (BODY* body1_ptr, BODY* body2_ptr ) const;
@@ -2133,12 +2130,6 @@
                                   DLIList<Curve*>& curves,
                                   bool& start_flag ) const;
 
-  CubitStatus curve_surface_intersection( Surface *surface, 
-                                          Curve* curve,
-                                          DLIList<Curve*> &new_curves ) const;
-  //Intersects input surface with input curve to produce intersection curve(s).
-  //If intersection results is nothing or a point, CUBIT_FAILURE is returned.
-
   CubitStatus embed_curves_into_surface( Surface *surface, 
                                          DLIList<Curve*> &curves_to_imprint,
                                          DLIList<TopologyBridge*> &temporary_bridges,

Modified: cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.cpp	2010-01-28 07:11:34 UTC (rev 3500)
+++ cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.cpp	2010-01-28 17:10:23 UTC (rev 3501)
@@ -4401,8 +4401,8 @@
 }
 
 CubitStatus
-AcisQueryEngine::fire_ray( CubitVector &origin,
-                           CubitVector &direction,
+AcisQueryEngine::fire_ray( const CubitVector &origin,
+                           const CubitVector &direction,
                            DLIList<TopologyBridge*> &at_entity_list,
                            DLIList<double> &ray_params,
                            int max_hits,
@@ -6692,8 +6692,8 @@
 #endif
 
 CubitStatus
-AcisQueryEngine::fire_ray( CubitVector &origin,
-                           CubitVector &direction,
+AcisQueryEngine::fire_ray( const CubitVector &origin,
+                           const CubitVector &direction,
                            DLIList<ENTITY*> &at_ENTITY_list,
                            DLIList<double> &ray_params,
                            DLIList<ENTITY*> *hit_ENTITY_list,

Modified: cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.hpp
===================================================================
--- cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.hpp	2010-01-28 07:11:34 UTC (rev 3500)
+++ cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisQueryEngine.hpp	2010-01-28 17:10:23 UTC (rev 3501)
@@ -417,8 +417,8 @@
     //- Gets the minimum distance between two entities and the closest positions 
     //- on those entities. Supports vertices, curves, surfaces, volumes and bodies.
 
-  virtual CubitStatus fire_ray( CubitVector &origin,
-                                CubitVector &direction,
+  virtual CubitStatus fire_ray( const CubitVector &origin,
+                                const CubitVector &direction,
                                 DLIList<TopologyBridge*> &at_entity_list,
                                 DLIList<double> &ray_params,
                                 int max_hits = 0,
@@ -885,8 +885,8 @@
     //- Clear any refinements set on objects in .SAT file after
     //- import.
 
-  CubitStatus fire_ray( CubitVector &origin,
-                        CubitVector &direction,
+  CubitStatus fire_ray( const CubitVector &origin,
+                        const CubitVector &direction,
                         DLIList<ENTITY*> &at_ENTITY_list,
                         DLIList<double> &ray_params,
                         DLIList<ENTITY*> *hit_ENTITY_list,

Modified: cgm/branches/merge-cubit12/geom/ACIS_SRC/gtcAttrib/src/attrib_gtc.C
===================================================================
--- cgm/branches/merge-cubit12/geom/ACIS_SRC/gtcAttrib/src/attrib_gtc.C	2010-01-28 07:11:34 UTC (rev 3500)
+++ cgm/branches/merge-cubit12/geom/ACIS_SRC/gtcAttrib/src/attrib_gtc.C	2010-01-28 17:10:23 UTC (rev 3501)
@@ -22,5 +22,5 @@
 
 #define ATTRIB_GTC_NAME "gtc"
 
-MASTER_ATTRIB_DEFN( "gtc master attribute" );
+MASTER_ATTRIB_DEFN( "gtc master attribute" )
 

Modified: cgm/branches/merge-cubit12/geom/GfxPreview.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/GfxPreview.cpp	2010-01-28 07:11:34 UTC (rev 3500)
+++ cgm/branches/merge-cubit12/geom/GfxPreview.cpp	2010-01-28 17:10:23 UTC (rev 3501)
@@ -3,6 +3,10 @@
 #include "GfxPreview.hpp"
 #include "GMem.hpp"
 #include "CubitVector.hpp"
+#include "Curve.hpp"
+#include "Surface.hpp"
+#include "GeometryQueryEngine.hpp"
+#include "Point.hpp"
 #include <assert.h>
 
 GfxPreview* GfxPreview::mInstance = 0;
@@ -76,6 +80,12 @@
   mInstance->p_draw_ref_volume(entity, color);
 }
 
+void GfxPreview::draw_ref_volume_edges(RefVolume* entity, int color)
+{
+  if(!mInstance) return;
+  mInstance->p_draw_ref_volume_edges(entity, color);
+}
+
 void GfxPreview::draw_ref_body(Body* entity, int color)
 {
   if(!mInstance) return;
@@ -187,4 +197,97 @@
   mInstance->p_draw_label(label, x, y, z, color);
 }
 
+void GfxPreview:: draw_cylinder(const CubitVector& axis, const CubitVector& origin, 
+                                 CubitBox& bounding_box, float radius, int color)
+{
+  if(!mInstance) return;
+  mInstance->p_draw_cylinder(axis, origin, bounding_box, radius, color);
+}
 
+void GfxPreview::draw_point(Point *pt, int color)
+{
+  CubitVector v = pt->coordinates();
+  draw_point(v, color);
+  flush();
+}
+
+void GfxPreview::draw_curve(Curve *curve, int color)
+{
+  int num_divs = 20;
+  double lo, hi;
+  curve->get_param_range(lo, hi);
+  double dv = (hi-lo)/(double)num_divs;
+  int i;
+  double param = lo;
+  for(i=0; i<num_divs; i++)
+  {
+    CubitVector p1, p2;
+    curve->position_from_u(param, p1);
+    param += dv;
+    curve->position_from_u(param, p2);
+    draw_line(p1.x(), p1.y(), p1.z(), p2.x(), p2.y(), p2.z(), color);
+  }
+  flush();
+  DLIList<Point*> pts;
+  curve->points(pts);
+  for(i=pts.size(); i>0; i--)
+  {
+    Point *cur_pt = pts.get_and_step();
+    draw_point(cur_pt, color);
+  }
+}
+
+void GfxPreview::draw_surface(Surface *surf, int color)
+{
+  int num_divs = 20;
+  double ulo, uhi, vlo, vhi;
+  surf->get_param_range_U(ulo, uhi);
+  surf->get_param_range_V(vlo, vhi);
+  double du = (uhi-ulo)/(double)num_divs;
+  double dv = (vhi-vlo)/(double)num_divs;
+  int i, j;
+  double uparam, vparam;
+  uparam = ulo;
+  for(i=0; i<num_divs; i++)
+  {
+    vparam = vlo;
+    for(j=0; j<num_divs; j++)
+    {
+      CubitVector p1, p2;
+      p1 = surf->position_from_u_v(uparam, vparam);
+      vparam += dv;
+      p2 = surf->position_from_u_v(uparam, vparam);
+      draw_line(p1.x(), p1.y(), p1.z(), p2.x(), p2.y(), p2.z(), color);
+    }
+    uparam += du;
+  }
+  vparam = vlo;
+  for(i=0; i<num_divs; i++)
+  {
+    uparam = ulo;
+    for(j=0; j<num_divs; j++)
+    {
+      CubitVector p1, p2;
+      p1 = surf->position_from_u_v(uparam, vparam);
+      uparam += du;
+      p2 = surf->position_from_u_v(uparam, vparam);
+      draw_line(p1.x(), p1.y(), p1.z(), p2.x(), p2.y(), p2.z(), color);
+    }
+    vparam += dv;
+  }
+  flush();
+}
+
+void GfxPreview::draw_surface_facets_shaded(Surface *surf, int color)
+{
+  GMem g_mem;
+
+  surf->get_geometry_query_engine()->get_graphics(surf, &g_mem);
+
+  const float* xyzs = reinterpret_cast<const float*>(g_mem.point_list());
+  GfxPreview::draw_polygons(g_mem.pointListCount, xyzs, 
+                            g_mem.fListCount, g_mem.facet_list(),
+                            color);
+  flush();
+}
+

Modified: cgm/branches/merge-cubit12/geom/facet/FacetModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/facet/FacetModifyEngine.cpp	2010-01-28 07:11:34 UTC (rev 3500)
+++ cgm/branches/merge-cubit12/geom/facet/FacetModifyEngine.cpp	2010-01-28 17:10:23 UTC (rev 3501)
@@ -3285,7 +3285,13 @@
    return CUBIT_FAILURE;
 }
 
+CubitBoolean FacetModifyEngine::bodies_interfering( BodySM* /*body1*/,  BodySM* /*body2*/ ) const
+{
+   PRINT_ERROR("Function not implemented in this engine.\n");
+   return CUBIT_FALSE;
+}
 
+
 CubitStatus FacetModifyEngine::stitch( DLIList<BodySM*> &bodies_to_stitch,
                                        DLIList<BodySM*> &new_bodies,
                                        bool tighten_gaps,



More information about the cgma-dev mailing list