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

## 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.

## 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.

## 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.

## 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)