Difference between revisions of "User:Plussai/GSoC 2012 log"

From BRL-CAD
(12 June 2012)
(27 May 2012)
Line 50: Line 50:
 
   int CreateMesh(const ON_MeshParameters& mp, ON_SimpleArray<ON_Mesh*>& mesh_list) const;  
 
   int CreateMesh(const ON_MeshParameters& mp, ON_SimpleArray<ON_Mesh*>& mesh_list) const;  
 
* but,it seems difficult to make a good  ON_MeshParameters to create mesh successfully.
 
* but,it seems difficult to make a good  ON_MeshParameters to create mesh successfully.
 +
* read the sources of opennurbs_mesh.cpp
 +
ON_Mesh* ON_BrepFace::CreateMesh(
 +
            const ON_MeshParameters& mp,
 +
            ON_Mesh* mesh
 +
            ) const
 +
{
 +
  return 0;
  
 
== 29 May 2012 ==
 
== 29 May 2012 ==

Revision as of 15:11, 13 June 2012

7 May 2012

  • build the brl-cad svn on VM successfully.
  • build the brlcad-7.18.4 on windows(vs2005),but some link error occured from libtclcad.lib(solved go_init(..)undefined)

8 May 2012

  • get familiar with the Brep structure.
    ON_CurveArray m_C2;//Pointers to parameter space trimming curves (used by trims)
    ON_CurveArray m_C3;//Pointers to 3d curves (used by edges)
    ON_BrepEdgeArray m_E;//edges
    ON_BrepFaceArray m_F;//faces
    ON_BrepLoopArray m_L;//loops
    ON_SurfaceArray m_S;//Pointers to parametric surfaces (used by faces)
    ON_BrepTrimArray m_T;//trims
    ON_BrepVertexArray m_V;//vertexs
    figure:[1]

9 May 2012

  • solve the link problem when build brlcad_18.4 in vs2005.(function go_init(..) undefinded)
  • understand some important point about NURBS. 3D NURBS is not tensor product surface,but it can be represented into tensor product surface by mapping 3D NURBS into 4D using homogeneous coordinate.(The NURBS BOOK page 30)
  • circle Arc can be represented by vector{(1,1,0,1),(1,1,1,1),(2,0,2,2)}in yz plane

10 May 2012

  • build brlcad-SVN successfully on my ubantu.(PS:/sh/make_deb.sh is a good tool)
  • study some about Nonuniform Scaling of Surfaces.

12 May 2012

  • find that the ehy.brep is lack of face and loop in brep structure.add them to make a correct brep.
   int surfindex = (*b)->m_S.Count();
   (*b)->NewFace(surfindex - 1);
   int faceindex = (*b)->m_F.Count();
   (*b)->NewOuterLoop(faceindex-1);

13 May 2012

  • find that computing the longest edge size is in the bspile/nurb_tess.c and the nurbs is represented by the form of struct face_g_snurb that is different from the ON_BrepSurface.It needs to implement a new interface for the longest edge size.

15 May 2012

  • configure some plug-in unit for my vim (e.g ctags,cscope,winmanger)

19 May 2012

  • submit a patch of brep_debug.cpp.check if the index is in the range and string of letter.

23 May 2012

  • update the patch of brep_debug.cpp.add the sub command 'info T','info E' for display the information of trims and edges in brep.Also, make the 'info' dispaly the information in a range of indexed elements for keeping sync with the 'plot'.

25 May 2012

  • add a subcommand 'plot SCV' to display nurbs control point net

27 May 2012

  • test the opennurbs' API of:
 int CreateMesh(const ON_MeshParameters& mp, ON_SimpleArray<ON_Mesh*>& mesh_list) const; 
  • but,it seems difficult to make a good ON_MeshParameters to create mesh successfully.
  • read the sources of opennurbs_mesh.cpp
ON_Mesh* ON_BrepFace::CreateMesh( 
           const ON_MeshParameters& mp,
           ON_Mesh* mesh
           ) const
{
 return 0;

29 May 2012

  • do some works on converting nurbs curve and surface to bezier

31 May 2012

  • do some works on comput the intersection between a line and a bezier curve/surface
  • some materials: the nurbs book and Curves and Surfaces for Computer Aided Geometric Design: A Practical Guide.


1 June 2012

  • implement RT_ADD_VLIST(vhead, pt1, BN_VLIST_POINT_DRAW) in src/libdm/dm-plot.c but it seems that dm-plot.c has nothing relation with the brep_debug.cpp

2 June 2012

  • implement RT_ADD_VLIST(vhead, pt1, BN_VLIST_POINT_DRAW) in src/libdm/dm-ogl.c and upload the patch
  • make progress for subcommand 'plot SCV' in mged

4 June 2012

  • one step that make 2d trimming curve into 3d can be skip because the BREP struct has the edge in 3d corresponding to the 3d trimming curve.
  • study the qd tree and kd tree for subdivision of nurbs surface in paper and the approximation error for the subdivision.

6 June 2012

  • figure out the coving triangles to avoid cracks when making boundary curve tessellation.
  • figure out the trimming curve tracing when splitting the trimming curve into bezier patch.(the active edge,active leaftree)

8 June 2012

  • read the opennurbs API and find the ON_NurbsCurve::MakePiecewiseBezier() can clamps ends and adds knots so the NURBS curve has bezier spans (all distinct knots have multiplitity = degree) ,the ON_NurbsSurface also has the same member method.It is a better way to convert trimming curve and surface into bezier
  • read the opennurbs API and find the ON_NurbsCurve::InsertKnot() can make the conversion between Nurbs and Bezier if setting the parameter multiplicity equal to degree.,the ON_NurbsSurface also has the same member method.

10 June 2012

  • add 'info TB' 'SB' to display information piecewise bezier of trimcurve and surface.patch has been upload
  • add 'plot TESS index plotres' to draw the trimesh of a nurbs surface. the tess has not taken apporimmation into consideration and just simply subdivide u,v into plotres steps;

12 June 2012

  • upload the patch to implement the adaptive bezier subdivision and triangle mesh display which includes the function bezierApporixmation(...),bezierSubdivision_kdtree..
  • read opennurbs_ext.cpp,especially figuring out the function of
 BBNode* SurfaceTree::surfaceBBox(...)
 BBNode* initialBBox(...)
 BBNode*SurfaceTree::subdivideSurfaceByKnots(...)
 BBNode* SurfaceTree::subdivideSurface(...)
  • SurfaceTree::subdivideSurfaceByKnots and BBNode* SurfaceTree::subdivideSurface can help me to create the kdtree as a represent of bezier subdivision.But the recursion termination condition is different.