Revision: 38002
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38002
Author:   dan_w
Date:     2011-07-01 07:25:31 +0000 (Fri, 01 Jul 2011)
Log Message:
-----------
incremental commit to "splines to bmesh" tool. A bit of the intersection search 
functionality although with some code removed that was hard to understand. will 
re-write for clarity

Modified Paths:
--------------
    
branches/soc-2011-avocado/blender/source/blender/bmesh/operators/primitiveops.c

Modified: 
branches/soc-2011-avocado/blender/source/blender/bmesh/operators/primitiveops.c
===================================================================
--- 
branches/soc-2011-avocado/blender/source/blender/bmesh/operators/primitiveops.c 
    2011-07-01 06:08:31 UTC (rev 38001)
+++ 
branches/soc-2011-avocado/blender/source/blender/bmesh/operators/primitiveops.c 
    2011-07-01 07:25:31 UTC (rev 38002)
@@ -689,18 +689,15 @@
 void bmesh_create_mesh_from_splines(BMesh *bm, BMOperator *op)
 {
        bGPDstroke *gps, *gpsn;
+       bGPDstroke *search_gps, *search_gpsn;
 
        float vec[3];
 
        BMVert *bm_vertex;
        BMVert *bm_previous;
 
-       int i;
+       int i, j;
 
-       // BMVert *v1, *v2, *v3, *v4, *v5, *v6, *v7, *v8;// bin
-       // float mat[4][4];
-       float off = 1.0f / 2.0f;// bin
-
        bGPDframe* p_frame = BMO_Get_Pnt(op, "frame");
 
        /* error checking */
@@ -722,6 +719,31 @@
                        {
                                // intersect line
 
+                               /* iterate strokes */
+                               for (search_gps = p_frame->strokes.first; 
search_gps; search_gps = search_gpsn)
+                               {
+
+                                       if(gps == search_gps)
+                                       {
+                                               continue;
+                                       }
+
+                                       search_gpsn = search_gps->next;
+
+                                       for(j = 0; j < search_gps->totpoints; 
j++)
+                                       {
+                                               if(j != 0)
+                                               {
+
+                                                       // intersection test
+                                                       
//if(isect_line_line_strict_v3(const float v1[3], const float v2[3], const 
float v3[3], const float v4[3], float vi[3], float *lambda))
+                                                       {
+                                                               //
+                                                       }
+                                               }
+                                       }
+                               }
+
                                // create edge
                                BM_Make_Edge(bm, bm_vertex, bm_previous, NULL, 
0);
                        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to