473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

doubts related to disk files in C

hello,
i have a very specific doubt related to file handling. My
objective is to make some modifications in the output data file of one
software which would be the input data file for another software.
Below is the output Data file in which i have to make some changes.

%% Version 3.0
%% VertexNumber: 129
%% EdgeNumber: 91
%% FaceNumber: 1
%% ElementNumber: 0
%% DO NOT CHANGE LINES ABOVE !!!!
% NET: Vertices <-> Edges <-> Faces <-> Elements
%
% Eingabefile ART3D: erstellt von Kluftgenerator FRAC3D
% Annette Hemminger,CAB,TU Braunschweig
%
% Vertices: x y z
0.00000 0.00000 0.00000
0.60000 0.00000 0.00000
0.60000 0.60000 0.00000
0.00000 0.60000 0.00000
0.11406 0.00000 0.00000
0.13623 0.00000 0.00000
0.17172 0.00000 0.00000
0.17628 0.00000 0.00000
0.35234 0.00000 0.00000
0.42312 0.00000 0.00000
0.53098 0.00000 0.00000
0.40753 0.60000 0.00000
0.35256 0.60000 0.00000
0.34731 0.60000 0.00000
0.25122 0.60000 0.00000
0.22941 0.60000 0.00000
0.22358 0.60000 0.00000
0.13107 0.60000 0.00000
0.06482 0.60000 0.00000
0.00289 0.60000 0.00000
0.00000 0.23049 0.00000
0.07409 0.33525 0.00000
0.06857 0.43509 0.00000
0.04289 0.28195 0.00000
0.02880 0.18295 0.00000
0.00727 0.48610 0.00000
0.00387 0.38616 0.00000
0.10471 0.52188 0.00000
0.09539 0.18428 0.00000
0.10806 0.27819 0.00000
0.23746 0.29384 0.00000
0.22926 0.36982 0.00000
0.47850 0.37484 0.00000
0.49267 0.47383 0.00000
0.35293 0.57271 0.00000
0.29944 0.26171 0.00000
0.29167 0.16202 0.00000
0.49368 0.26564 0.00000
0.50155 0.36533 0.00000
0.10515 0.07486 0.00000
0.09709 0.12485 0.00000
0.10515 0.07486 0.00000
0.09709 0.12485 0.00000
0.09061 0.02506 0.00000
0.18503 0.26558 0.00000
0.16258 0.16813 0.00000
0.58285 0.34703 0.00000
0.59228 0.44659 0.00000
0.56025 0.41951 0.00000
0.57424 0.32050 0.00000
0.21060 0.00746 0.00000
0.20343 0.10720 0.00000
0.11507 0.38269 0.00000
0.11456 0.28269 0.00000
0.51232 0.15172 0.00000
0.53373 0.24913 0.00000
0.47338 0.18218 0.00000
0.46663 0.28195 0.00000
0.22524 0.30633 0.00000
0.21203 0.40545 0.00000
0.21672 0.37023 0.00000
0.21633 0.20923 0.00000
0.23638 0.11126 0.00000
0.23230 0.45406 0.00000
0.22742 0.51884 0.00000
0.32956 0.02007 0.00000
0.32274 0.11983 0.00000
0.58261 0.39944 0.00000
0.57876 0.29951 0.00000
0.46648 0.34126 0.00000
0.44232 0.43830 0.00000
0.36446 0.10242 0.00000
0.36162 0.00246 0.00000
0.14272 0.45390 0.00000
0.12677 0.35518 0.00000
0.47332 0.10968 0.00000
0.47650 0.20962 0.00000
0.52630 0.08201 0.00000
0.59152 0.49841 0.00000
0.59598 0.59831 0.00000
0.01448 0.50344 0.00000
0.52076 0.12916 0.00000
0.49718 0.03198 0.00000
0.26603 0.18533 0.00000
0.29723 0.28034 0.00000
0.33174 0.53201 0.00000
0.34173 0.43251 0.00000
0.26201 0.42456 0.00000
0.22015 0.56173 0.00000
0.11859 0.15803 0.00000
0.11778 0.22939 0.00000
0.23468 0.49093 0.00000
0.22824 0.39114 0.00000
0.28036 0.29025 0.00000
0.22824 0.39114 0.00000
0.28036 0.29025 0.00000
0.27916 0.39025 0.00000
0.02009 0.04304 0.00000
0.00760 0.14225 0.00000
0.39418 0.43620 0.00000
0.41639 0.51644 0.00000
0.17622 0.03260 0.00000
0.35363 0.52087 0.00000
0.51207 0.33853 0.00000
0.35757 0.23854 0.00000
0.34344 0.13954 0.00000
0.37560 0.37198 0.00000
0.35782 0.27357 0.00000
0.11984 0.07864 0.00000
0.28973 0.38906 0.00000
0.28121 0.48869 0.00000
0.16234 0.04287 0.00000
0.32035 0.40507 0.00000
0.31809 0.50505 0.00000
0.20023 0.28605 0.00000
0.21598 0.18730 0.00000
0.42509 0.07592 0.00000
0.40316 0.03738 0.00000
0.36223 0.12862 0.00000
0.34065 0.05352 0.00000
0.58081 0.58628 0.00000
0.56766 0.48714 0.00000
0.09951 0.32115 0.00000
0.28002 0.51418 0.00000
0.25579 0.55976 0.00000
0.05520 0.53238 0.00000
0.12117 0.46587 0.00000
0.10676 0.36692 0.00000
0.00913 0.26798 0.00000
0.26997 0.22346 0.00000
0.28808 0.32180 0.00000
0.22742 0.41669 0.00000
0.20498 0.31924 0.00000
$
% Edges (Indices to List of Points):
1: 0 4
1: 4 5
1: 5 6
1: 6 7
1: 7 8
1: 8 9
1: 9 10
1: 10 1
2: 1 2
3: 2 11
3: 11 12
3: 12 13
3: 11 12
3: 12 13
3: 13 14
3: 14 15
3: 15 16
3: 16 17
3: 17 18
3: 18 19
3: 19 3
4: 3 20
4: 20 0
-1: 21 22
-2: 23 24
-3: 25 26
-4: 17 27
-5: 29 28
-5: 30 31
-6: 32 33
-6: 13 34
-7: 35 36
-8: 37 38
-8: 4 39
-9: 40 41
-10: 42 43
-11: 44 45
-12: 46 47
-13: 48 49
-14: 50 51
-15: 53 52
-16: 54 55
-17: 56 58
-18: 58 57
-18: 59 60
-19: 61 62
-20: 63 64
-20: 65 66
-21: 67 68
-22: 69 70
-22: 71 72
-22: 73 74
-23: 10 75
-24: 76 77
-25: 19 78
-26: 79 80
-27: 81 82
-28: 83 84
-29: 31 85
-30: 16 86
-31: 87 88
-32: 89 61
-33: 61 90
-34: 91 92
-35: 93 94
-34: 91 92
-35: 93 94
-35: 96 95
-35: 7 97
-36: 12 34
-37: 34 98
-37: 53 99
-38: 100 101
-38: 102 103
-39: 5 104
-40: 105 106
-41: 6 107
-41: 108 109
-42: 110 111
-43: 9 112
-43: 113 114
-44: 8 115
-44: 116 117
-45: 88 29
-46: 29 118
-47: 11 96
-48: 85 119
-49: 14 120
-50: 18 121
-51: 122 123
-52: 20 124
-53: 125 126
-54: 127 58
-55: 58 128
-56: 15 62
$
% Faces (Indices to List of Edges):
1: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20
$

The file starts with the comments and ends with the $ sign. after
modification, i have to save the file in the same format as above.
The modifications to be done are as follows:
1. Add 4 new values of vertices for all the three coordinates and
increment the value of the remaining vertices by a certain value for
either X or Y coordinate.
2. Add 4 new values for edges 1 & 3 (2 each). For the remaining
values, only the values after the ":" are to incremented by 4.
for example: if the edge is as follows:
1: 0 4 then the new value should looke like 1: 4 8 and so on.
Same goes for the negative edges as well.
3. The 2nd operation is to be repeated for Faces as well with the only
change that 2 new values are to be added.

Note: the comments on the top & in between are to be written as it is.

Please give me the solution for the abovementioned problems. I would
be grateful to you.
Thankyou in advance.
Nov 14 '05 #1
3 1253
"Ameya" <am**********@rediffmail.com> wrote in message
news:da**************************@posting.google.c om...
hello,
i have a very specific doubt related to file handling. My
objective is to make some modifications in the output data file of one
software which would be the input data file for another software.
Below is the output Data file in which i have to make some changes.


No problem: have no doubt about the fact that here is not the place to ask.

--
Chqrlie.
Nov 14 '05 #2
am**********@rediffmail.com (Ameya) wrote:
% Eingabefile ART3D: erstellt von Kluftgenerator FRAC3D
% Annette Hemminger,CAB,TU Braunschweig


Erm... do your own homework?

Richard
Nov 14 '05 #3
In article <da**************************@posting.google.com >,
am**********@rediffmail.com says...
hello,
i have a very specific doubt related to file handling.
s/doubt/question For some reason, this is the most misused
word in this group non-native English speakers.

[huge snip]
Please give me the solution for the abovementioned problems. I would
be grateful to you.
Thankyou in advance.


Sorry, but do your own homework. Everybody else had to do it on their
own. You'll be glad you did someday.

--
Randy Howard (2reply remove FOOBAR)
"For some reason most people seem to be born without the part
of the brain that understands pointers." -- Joel Spolsky
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Rajorshi Biswas | last post by:
Hi folks, Suppose I have a large (1 GB) text file which I want to read in reverse. The number of characters I want to read at a time is insignificant. I'm confused as to how best to do it. Upon...
1
by: NagaKiran | last post by:
Hi I want to post VBA related doubts. Where can I post my doubts in VBA? thanks bye
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
1
by: archana | last post by:
Hi all, I want to clear one doubt which i am facing regarding timer. Suppose i have one timer in which i am generating some files. and interval of my timer is say 5 min. Say suppose at...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.