

Curve Networks and Cycles are stored separately, with different formats as following.

Curve file(*.curve): 

---------------------------

The first line of the .curve file stores the number of curves. Each curve is formed by firstly some curve information, then followed by the coordinate of each point on that curve. For each curve, the first line is the curve information, which has three values: the number of points on that curve, whether the curve is open or closed (not used, you can put any integer there), and the curve Capacity (not used, you can put any integer there). 



An example:


1  258                             // number of curves
2  3 0 2                           // for the first curve, number of points is 3 
3  -0.285999 0.110215 0.028084     // coordinate of the first point on this curve
4  -0.288441 0.110215 0.0371736    // coordinate of the second point on this curve
...


Cycle file (*.cycle): 

---------------------------

The first line of the .cycle file stores the number of cycles. For each cycle, the first line tells the number of curves used to form that cycle, the following lines store those curves, one in each line. Each curve in the cycle is represented with three values: curve ID in the .curve file, curve Direction (1 means following the direction of the curve in the .curve file, 2 means against), and curve Instance (not used, you can put any integer there)



An example:



1  44          // number of cycles
2  4           // number of curves in the first cycle
3  0 1 0       // curve ID is 0 , Direction is 1 , Instance is 0
4  16 2 0      // curve ID is 16, Direction is 2, Instance is 0
...



To save cycles and Surface, use the <Save> operation in the demo. The Surface file is in OFF format.



To get correct cycles, you may need to change capacity or add constraint, please refer to our video to see how to do these.


If you want to load cycles in your program, you need to load both curve and cycle files. 

