[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31243] branches/nurbs-merge: New tools:

Sergey Sharybin g.ulairi at gmail.com
Wed Aug 11 17:38:21 CEST 2010


Revision: 31243
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31243
Author:   nazgul
Date:     2010-08-11 17:38:20 +0200 (Wed, 11 Aug 2010)

Log Message:
-----------
New tools:

- Surface refine
- Surface split

Not added to the UI yet, access via spacebar

Lots of random code cleanup (lots more to do).
Also contains interim code for Surface Blend functionality, currently disabled due to bugs.

Own changes:
 - replace CU_CYCLIC with CU_NURB_CYCLIC
 - Also contains changes from several further commits:
  * Fix for compile error spotted by Laurynas (rev28111)
  * Another small compile fix
    Not sure why MSVC didn't catch this in the first place (rev28118)

Merge rev28110, 28111 and 28118 from nurbs25 branch

Revision Links:
--------------
    http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28111
    http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28118
    http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28110

Modified Paths:
--------------
    branches/nurbs-merge/intern/nurbana/extern/nurbana.h
    branches/nurbs-merge/intern/nurbana/intern/blenderNurbsStruct.h
    branches/nurbs-merge/intern/nurbana/intern/libNurbana.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbConstruct.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbConstruct.h
    branches/nurbs-merge/intern/nurbana/intern/nbDegree.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbDegree.h
    branches/nurbs-merge/intern/nurbana/intern/nbFitting.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbGenerate.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbGenerate.h
    branches/nurbs-merge/intern/nurbana/intern/nbKnot.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbMath.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbNURBS.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbNURBS.h
    branches/nurbs-merge/intern/nurbana/intern/nbPrimitives.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbTessellator.h
    branches/nurbs-merge/intern/nurbana/intern/nbTrimTessellator.cpp
    branches/nurbs-merge/intern/nurbana/intern/nbTrimTessellator.h
    branches/nurbs-merge/intern/nurbana/intern/nbUtils.h
    branches/nurbs-merge/intern/nurbana/intern/trim/nbSubDiv.cpp
    branches/nurbs-merge/intern/nurbana/intern/trim/nbSubDiv.h
    branches/nurbs-merge/intern/nurbana/intern/trim/nbTessGrid.cpp
    branches/nurbs-merge/intern/nurbana/intern/trim/nbTrimPatch.cpp
    branches/nurbs-merge/release/scripts/ui/space_view3d.py
    branches/nurbs-merge/release/scripts/ui/space_view3d_toolbar.py
    branches/nurbs-merge/source/blender/blenkernel/BKE_curve.h
    branches/nurbs-merge/source/blender/blenkernel/intern/displist.c
    branches/nurbs-merge/source/blender/blenloader/intern/readfile.c
    branches/nurbs-merge/source/blender/editors/curve/curve_intern.h
    branches/nurbs-merge/source/blender/editors/curve/curve_ops.c
    branches/nurbs-merge/source/blender/editors/curve/editcurve.c
    branches/nurbs-merge/source/blender/editors/include/ED_view3d.h
    branches/nurbs-merge/source/blender/editors/space_view3d/drawobject.c

Modified: branches/nurbs-merge/intern/nurbana/extern/nurbana.h
===================================================================
--- branches/nurbs-merge/intern/nurbana/extern/nurbana.h	2010-08-11 15:37:24 UTC (rev 31242)
+++ branches/nurbs-merge/intern/nurbana/extern/nurbana.h	2010-08-11 15:38:20 UTC (rev 31243)
@@ -74,14 +74,14 @@
 typedef void* NurbanaObj_ptr; // to hide pointer to C++ object in C space
 
 extern NurbanaObj_ptr NRB_addObject(BlenderNurbs_ptr bNurbs);
+extern NurbanaObj_ptr NRB_CreatePrimitive(NurbanaObj_ptr nop, unsigned char type);
 
 
 
-extern void NRB_init(NurbanaObj_ptr nop);
+//extern void NRB_init(NurbanaObj_ptr nop);
 
 extern NurbanaObj_ptr NRB_reallocate(BlenderNurbs_ptr bNurbs);
 
-extern NurbanaObj_ptr NRB_CreatePrimitive(NurbanaObj_ptr nop, unsigned char type);
 extern void NRB_removeObject(NurbanaObj_ptr nop);
 
 extern void NRB_changeCyclic(NurbanaObj_ptr nop,int uv);
@@ -95,9 +95,10 @@
 extern void NRB_UpdateSize(NurbanaObj_ptr nop);
 
 extern void NRB_setLength(int U, int V, int shiftU, int shiftV, int copyKnots, NurbanaObj_ptr nurb);
-extern void NRB_reallocKnots(int U, int V, int copy, NurbanaObj_ptr nurb);
+//extern void NRB_reallocKnots(int U, int V, int copy, NurbanaObj_ptr nurb);
+//extern void NRB_reallocCtlPts(int U, int V, int shiftU, int shiftV, NurbanaObj_ptr nurb);
+
 extern void NRB_copyPatchFromBuffer(nbReal4 *buffer, int curveLength, int nextCurve, int curveCount, NurbanaObj_ptr nurb, int uOffset, int vOffset);
-extern void NRB_reallocCtlPts(int U, int V, int shiftU, int shiftV, NurbanaObj_ptr nurb);
 
 extern void NRB_ConvertToPrimitive(NurbanaObj_ptr nop,unsigned char type);
 
@@ -145,8 +146,11 @@
 extern void NRB_KnotInsert(NurbanaObj_ptr nop,nbReal *X, int r, int UV);
 
 extern void NRB_split(NurbanaObj_ptr nop, nbReal x, int uv, nbReal4* dst, int dstLen, int* frstLen, int* scndLen, int* k, int* newPoints, int* inserted);
-extern void NRB_splitBuffer(nbReal4* buffer, int newPoints, NurbanaObj_ptr nop, NurbanaObj_ptr nop2, nbReal splitKnot, int newLength, int span, int uv, int frstLen, int scndLen);
+extern void NRB_splitConvertBuffer(nbReal4* buffer, int newPoints, NurbanaObj_ptr nop, NurbanaObj_ptr nop2, nbReal splitKnot, int newLength, int span, int uv, int frstLen, int scndLen);
 
+
+extern void NRB_Blend(NurbanaObj_ptr in1, NurbanaObj_ptr in2, int edgeA, int edgeB, NurbanaObj_ptr out);
+
 extern void NRB_DegreeElevate(NurbanaObj_ptr nop,int Uinc, int Vinc);
 extern void NRB_DegreeReduce(NurbanaObj_ptr nop,int Udec, int Vdec);
 

Modified: branches/nurbs-merge/intern/nurbana/intern/blenderNurbsStruct.h
===================================================================
--- branches/nurbs-merge/intern/nurbana/intern/blenderNurbsStruct.h	2010-08-11 15:37:24 UTC (rev 31242)
+++ branches/nurbs-merge/intern/nurbana/intern/blenderNurbsStruct.h	2010-08-11 15:38:20 UTC (rev 31243)
@@ -105,534 +105,3 @@
 	struct BlenderNurbs *m_trimCurve;
 };
 #endif
-#ifndef _BLENDERNURBSSTRUCT_H
-#define _BLENDERNURBSSTRUCT_H
-
-// These structures need to be kept in sync with Blender's Nurb and BPoint struct
-
-typedef struct Point3d {
-//struct BPoint {
-	//x, y, z and w coordinates.
-	//float vec[4];
-	float x;
-	float y;
-	float z;
-	float H;
-
-	//Tilt in 3D View.
-	float alfa;
-
-	//Used for softbody goal weight.
-	float weight;
-
-	//Selection status.
-	short f1;
-
-	//Is point hidden or not.
-	short hide;
-
-	//User-set radius per point for bevelling etc.
-	float radius;
-
-	float pad;
-
-}Point3d;
-
-//typedef BPoint Point3d;
-
-//typdef BezTriple void;
-
-//typedef struct Nurb {
-struct BlenderNurbs {
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_next;
-
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_prev;
-
-	//CU_2D is set for curve objects.
-	//Next values should be extracted with expresion (type & 7).
-	//CU_POLY	- ???;
-	//CU_BEZIER - bezier curve;
-	//CU_BSPLINE - ???;
-	//CU_CARDINAL - ???;
-	//CU_NURBS - nurbs curve or surface.
-	short m_type;
-
-	//Index into material list.
-	short m_mat_nr;
-
-	//1 if hiden, 0 if not.
-	short m_hide;
-
-	short m_flag;
-
-	//Number of points in the U or V directions.
-	short m_pntsuv[2];
-
-	//Tesselation resolution in the U or V directions.
-	short m_resoluv[2];
-
-	//Order in the U or V directions (basis function degree + 1).
-	short m_orderuv[2];
-
-	short m_flaguv[2];
-
-	//Knot vector in U or V direction.
-	float* m_knotsuv[2];
-
-	Point3d * m_bp;
-
-	void * m_bezt;// BezTriple * bezt;
-
-	// KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE 
-	short m_tilt_interp;
-
-	short m_radius_interp;
-
-	int m_charidx;
-
-	short m_isovis;
-
-	short m_isores;
-
-	short m_isoden;
-
-	short m_knottypeuv[2];
-
-	char pad3;
-
-	char pad4;
-
-	//Current knot, will be used in knot editor 
-	short m_cur_knotuv[2];
-
-	void * m_nurbanaPtr;
-	//short m_allocByNurbana;
-};
-#endif
-#ifndef _BLENDERNURBSSTRUCT_H
-#define _BLENDERNURBSSTRUCT_H
-
-// These structures need to be kept in sync with Blender's Nurb and BPoint struct
-
-typedef struct Point3d {
-//struct BPoint {
-	//x, y, z and w coordinates.
-	//float vec[4];
-	float x;
-	float y;
-	float z;
-	float H;
-
-	//Tilt in 3D View.
-	float alfa;
-
-	//Used for softbody goal weight.
-	float weight;
-
-	//Selection status.
-	short f1;
-
-	//Is point hidden or not.
-	short hide;
-
-	//User-set radius per point for bevelling etc.
-	float radius;
-
-	float pad;
-
-}Point3d;
-
-//typedef BPoint Point3d;
-
-//typdef BezTriple void;
-
-//typedef struct Nurb {
-struct BlenderNurbs {
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_next;
-
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_prev;
-
-	//CU_2D is set for curve objects.
-	//Next values should be extracted with expresion (type & 7).
-	//CU_POLY	- ???;
-	//CU_BEZIER - bezier curve;
-	//CU_BSPLINE - ???;
-	//CU_CARDINAL - ???;
-	//CU_NURBS - nurbs curve or surface.
-	short m_type;
-
-	//Index into material list.
-	short m_mat_nr;
-
-	//1 if hiden, 0 if not.
-	short m_hide;
-
-	short m_flag;
-
-	//Number of points in the U or V directions.
-	short m_pntsuv[2];
-
-	//Tesselation resolution in the U or V directions.
-	short m_resoluv[2];
-
-	//Order in the U or V directions (basis function degree + 1).
-	short m_orderuv[2];
-
-	short m_flaguv[2];
-
-	//Knot vector in U or V direction.
-	float* m_knotsuv[2];
-
-	Point3d * m_bp;
-
-	void * m_bezt;// BezTriple * bezt;
-
-	// KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE 
-	short m_tilt_interp;
-
-	short m_radius_interp;
-
-	int m_charidx;
-
-	short m_isovis;
-
-	short m_isores;
-
-	short m_isoden;
-
-	short m_knottypeuv[2];
-
-	char pad3;
-
-	char pad4;
-
-	//Current knot, will be used in knot editor 
-	short m_cur_knotuv[2];
-
-	//void * m_nurbanaPtr;
-	short m_allocByNurbana;
-};
-#endif
-#ifndef _BLENDERNURBSSTRUCT_H
-#define _BLENDERNURBSSTRUCT_H
-
-// These structures need to be kept in sync with Blender's Nurb and BPoint struct
-
-typedef struct Point3d {
-//struct BPoint {
-	//x, y, z and w coordinates.
-	//float vec[4];
-	float x;
-	float y;
-	float z;
-	float H;
-
-	//Tilt in 3D View.
-	float alfa;
-
-	//Used for softbody goal weight.
-	float weight;
-
-	//Selection status.
-	short f1;
-
-	//Is point hidden or not.
-	short hide;
-
-	//User-set radius per point for bevelling etc.
-	float radius;
-
-	float pad;
-
-}Point3d;
-
-//typedef BPoint Point3d;
-
-//typdef BezTriple void;
-
-//typedef struct Nurb {
-struct BlenderNurbs {
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_next;
-
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_prev;
-
-	//CU_2D is set for curve objects.
-	//Next values should be extracted with expresion (type & 7).
-	//CU_POLY	- ???;
-	//CU_BEZIER - bezier curve;
-	//CU_BSPLINE - ???;
-	//CU_CARDINAL - ???;
-	//CU_NURBS - nurbs curve or surface.
-	short m_type;
-
-	//Index into material list.
-	short m_mat_nr;
-
-	//1 if hiden, 0 if not.
-	short m_hide;
-
-	short m_flag;
-
-	//Number of points in the U or V directions.
-	short m_pntsuv[2];
-
-	//Tesselation resolution in the U or V directions.
-	short m_resoluv[2];
-
-	//Order in the U or V directions (basis function degree + 1).
-	short m_orderuv[2];
-
-	short m_flaguv[2];
-
-	//Knot vector in U or V direction.
-	float* m_knotsuv[2];
-
-	Point3d * m_bp;
-
-	void * m_bezt;// BezTriple * bezt;
-
-	// KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE 
-	short m_tilt_interp;
-
-	short m_radius_interp;
-
-	int m_charidx;
-
-	short m_isovis;
-
-	short m_isores;
-
-	short m_isoden;
-
-	short m_knottypeuv[2];
-
-	char pad3;
-
-	char pad4;
-
-	//Current knot, will be used in knot editor 
-	short m_cur_knotuv[2];
-
-	void * m_nurbanaPtr;
-
-	struct BlenderNurbs *m_trimCurve;
-};
-#endif
-#ifndef _BLENDERNURBSSTRUCT_H
-#define _BLENDERNURBSSTRUCT_H
-
-// These structures need to be kept in sync with Blender's Nurb and BPoint struct
-
-typedef struct Point3d {
-//struct BPoint {
-	//x, y, z and w coordinates.
-	//float vec[4];
-	float x;
-	float y;
-	float z;
-	float H;
-
-	//Tilt in 3D View.
-	float alfa;
-
-	//Used for softbody goal weight.
-	float weight;
-
-	//Selection status.
-	short f1;
-
-	//Is point hidden or not.
-	short hide;
-
-	//User-set radius per point for bevelling etc.
-	float radius;
-
-	float pad;
-
-}Point3d;
-
-//typedef BPoint Point3d;
-
-//typdef BezTriple void;
-
-//typedef struct Nurb {
-struct BlenderNurbs {
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_next;
-
-	//Multiple nurbs per curve object are allowed.
-	struct BlenderNurbs * m_prev;
-
-	//CU_2D is set for curve objects.
-	//Next values should be extracted with expresion (type & 7).
-	//CU_POLY	- ???;
-	//CU_BEZIER - bezier curve;
-	//CU_BSPLINE - ???;
-	//CU_CARDINAL - ???;
-	//CU_NURBS - nurbs curve or surface.
-	short m_type;
-
-	//Index into material list.
-	short m_mat_nr;
-
-	//1 if hiden, 0 if not.
-	short m_hide;
-
-	short m_flag;
-
-	//Number of points in the U or V directions.
-	short m_pntsuv[2];
-
-	//Tesselation resolution in the U or V directions.
-	short m_resoluv[2];
-
-	//Order in the U or V directions (basis function degree + 1).
-	short m_orderuv[2];
-
-	short m_flaguv[2];
-
-	//Knot vector in U or V direction.
-	float* m_knotsuv[2];
-
-	Point3d * m_bp;
-
-	void * m_bezt;// BezTriple * bezt;
-
-	// KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE 
-	short m_tilt_interp;
-
-	short m_radius_interp;
-
-	int m_charidx;
-
-	short m_isovis;
-
-	short m_isores;
-
-	short m_isoden;
-
-	short m_knottypeuv[2];
-
-	char pad3;
-
-	char pad4;
-
-	//Current knot, will be used in knot editor 
-	short m_cur_knotuv[2];
-
-	void * m_nurbanaPtr;
-	//short m_allocByNurbana;
-};
-#endif

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list