Compare commits

..
265 Commits
Author SHA1 Message Date
Clifford Yapp 48bce25478 d-bindings code moved into trunk's misc directory for storage - closing branch for now as it is inactive. If work resumes branch can be revived. (svn branch delete)
svn:revision:68381
svn:branch:d-binding
svn:account:starseeker
2016-07-20 00:55:06 +00:00
Clifford Yapp 5af0ef509c Sync with trunk thru r68370
svn:revision:68377
svn:branch:d-binding
svn:account:starseeker
2016-07-19 20:18:36 +00:00
Clifford Yapp 3fa844578a Sync with trunk thru r68300
svn:revision:68302
svn:branch:d-binding
svn:account:starseeker
2016-07-14 17:04:26 +00:00
Clifford Yapp 9fe54f1ac2 Sync with trunk thru r66800
svn:revision:68300
svn:branch:d-binding
svn:account:starseeker
2016-07-14 16:41:55 +00:00
Clifford Yapp 40087fb856 Sync with trunk thru r62800
svn:revision:68298
svn:branch:d-binding
svn:account:starseeker
2016-07-14 16:24:47 +00:00
Clifford Yapp 84d8a6bf91 Sync with trunk thru r61800
svn:revision:68297
svn:branch:d-binding
svn:account:starseeker
2016-07-14 16:00:47 +00:00
Clifford Yapp 3d582adce2 Sync with trunk thru r61600
svn:revision:68296
svn:branch:d-binding
svn:account:starseeker
2016-07-14 15:40:28 +00:00
Clifford Yapp f9c029783d Hmm... something causing trouble with large merges here... Sync with trunk thru r61550
svn:revision:68295
svn:branch:d-binding
svn:account:starseeker
2016-07-14 15:39:25 +00:00
Clifford Yapp 391b395437 Sync with trunk thru r61500
svn:revision:68294
svn:branch:d-binding
svn:account:starseeker
2016-07-14 15:06:45 +00:00
Clifford Yapp 23aef78357 Sync with trunk thru r61290
svn:revision:68291
svn:branch:d-binding
svn:account:starseeker
2016-07-14 01:11:15 +00:00
Thomas Browder 2bf3f5104a check body lines that haven
svn:revision:61324
svn:branch:d-binding
svn:account:tbrowder2
2014-06-14 11:30:05 +00:00
Thomas Browder e0dea3fc80 tidy format
svn:revision:61323
svn:branch:d-binding
svn:account:tbrowder2
2014-06-14 11:21:54 +00:00
Thomas Browder 7dfe541443 add comment
svn:revision:61322
svn:branch:d-binding
svn:account:tbrowder2
2014-06-14 11:13:47 +00:00
Thomas Browder 7ba33c55f6 add hash of all D types
svn:revision:61321
svn:branch:d-binding
svn:account:tbrowder2
2014-06-14 11:08:06 +00:00
Thomas Browder cc6220eb28 use correct map and array for 32-bit
svn:revision:61320
svn:branch:d-binding
svn:account:tbrowder2
2014-06-14 10:57:01 +00:00
Thomas Browder 88df739505 extract type conversion code to its own function; change var name text to line for more clarity
svn:revision:61319
svn:branch:d-binding
svn:account:tbrowder2
2014-06-13 22:02:16 +00:00
Thomas Browder 2eea0ff106 ws
svn:revision:61318
svn:branch:d-binding
svn:account:tbrowder2
2014-06-13 21:59:45 +00:00
Thomas Browder be50d00358 add a var to indicate 64- or 32-bit architecturs; make choice of maps 'automatic' based on that var's value
svn:revision:61317
svn:branch:d-binding
svn:account:tbrowder2
2014-06-13 21:58:57 +00:00
Thomas Browder 29ff3b8141 add known limitations
svn:revision:61316
svn:branch:d-binding
svn:account:tbrowder2
2014-06-13 21:56:08 +00:00
Thomas Browder df7e4ae3a7 add an iterate option and better failure reporting
svn:revision:61296
svn:branch:d-binding
svn:account:tbrowder2
2014-06-13 11:41:49 +00:00
Thomas Browder 321c979db0 add more test cases
svn:revision:61290
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 21:47:46 +00:00
Thomas Browder 1a8c813195 correct D form (null is a value, not a type)
svn:revision:61289
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 21:14:29 +00:00
Thomas Browder ec08190be8 oops, forgot the asterisks (duh)
svn:revision:61285
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 20:10:24 +00:00
Thomas Browder 350ecdcead hopefully not bragging too soon
svn:revision:61284
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 19:21:56 +00:00
Thomas Browder 202169f326 first stab at a null detector regex
svn:revision:61283
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 19:20:50 +00:00
Thomas Browder 90bb4979e2 take it away for now because preprocessing should have rewritten it to some other form--it will take a more complex regex
svn:revision:61282
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 18:56:53 +00:00
Thomas Browder a62c8f7ae8 add NULL to the conversion map
svn:revision:61281
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 18:51:47 +00:00
Thomas Browder 9f5a5d7c53 add a bit more reporting info (need to return number of objects from the final conversion functio to do that); simplify some code
svn:revision:61278
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 18:11:06 +00:00
Thomas Browder 74658e80e0 in the output D file report which C objects actually needed conversion
svn:revision:61276
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 17:55:47 +00:00
Thomas Browder 3fc6341743 organize D conversion processing cleaner; factor out some debug code into a separate function
svn:revision:61275
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 17:46:13 +00:00
Thomas Browder db023abc61 correct typo
svn:revision:61270
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 14:17:04 +00:00
Thomas Browder 5cb0e31bdd start refactoring conversion code back into its own subroutine; put regexes in their own module
svn:revision:61268
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 13:34:32 +00:00
Thomas Browder 7159fabc5b rethink conversion function; use power of regexes
svn:revision:61266
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 12:21:45 +00:00
Thomas Browder 68b40efb10 reset name hash for every input file (each is a separate D module with its own namespace)
svn:revision:61265
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 12:19:50 +00:00
Thomas Browder e6c4c5a24d typo
svn:revision:61264
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 12:17:40 +00:00
Thomas Browder 739462832f add somw more test objects
svn:revision:61263
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 11:25:15 +00:00
Thomas Browder 2475f052de add another shared function; format
svn:revision:61262
svn:branch:d-binding
svn:account:tbrowder2
2014-06-12 11:24:11 +00:00
Thomas Browder 90f30fc903 add new shared function
svn:revision:61248
svn:branch:d-binding
svn:account:tbrowder2
2014-06-11 18:59:51 +00:00
Thomas Browder a3ab11d360 change var 'orig_line' to more descriptive 'c_line'
svn:revision:61238
svn:branch:d-binding
svn:account:tbrowder2
2014-06-11 11:10:08 +00:00
Thomas Browder b7840fb79a add info; fix typo
svn:revision:61237
svn:branch:d-binding
svn:account:tbrowder2
2014-06-11 11:08:26 +00:00
Thomas Browder 3c1f7f4942 add missing variants in 32-bit map; comment out dup lines in maps; add preferred 32-bit map key order
svn:revision:61236
svn:branch:d-binding
svn:account:tbrowder2
2014-06-11 11:07:37 +00:00
Thomas Browder e852d522ed ws
svn:revision:61235
svn:branch:d-binding
svn:account:tbrowder2
2014-06-11 11:06:20 +00:00
Thomas Browder 56d9029c89 add some ID info for reference
svn:revision:61225
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 16:58:00 +00:00
Thomas Browder 0e0da6bf9e expose a new, 4th object type
svn:revision:61224
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 16:56:18 +00:00
Thomas Browder 99d9020f52 first three object types pass conversion
svn:revision:61223
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 16:55:03 +00:00
Thomas Browder ef07ac1e0b first two object type pass conversion
svn:revision:61222
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 16:06:29 +00:00
Thomas Browder 5f181bd8ca define a test header for incremental work and possible future regression tests
svn:revision:61221
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 16:05:30 +00:00
Thomas Browder 5c220b6d32 add notes about conversion
svn:revision:61216
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 12:40:55 +00:00
Thomas Browder 9c177806de turn off debug line--we have a good compile of our first object in bu.h (hooray)
svn:revision:61215
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 12:37:04 +00:00
Thomas Browder 5ae689dc53 we're checking compilation only
svn:revision:61214
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 12:34:53 +00:00
Thomas Browder 7c8a1cb216 check the regex construction
svn:revision:61213
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 12:33:55 +00:00
Thomas Browder fda8d3701e the D lang wiki has some missing map values
svn:revision:61212
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 12:32:51 +00:00
Thomas Browder 4fa63c885f now have a complte data flow from initial read through checking final solution with a D build; now to start tweaking conversion object type by object type
svn:revision:61210
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 12:13:03 +00:00
Thomas Browder a3f546f80d remove unneeded module
svn:revision:61208
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 12:01:06 +00:00
Thomas Browder fc736f17ad remove dead code
svn:revision:61207
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 11:57:34 +00:00
Thomas Browder 2da8da30a0 making incremental progress
svn:revision:61206
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 11:52:34 +00:00
Thomas Browder 470ad9bdb8 zero in on final data flow
svn:revision:61205
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 11:10:56 +00:00
Thomas Browder 757bb51c83 implement c_line_to_d_line function
svn:revision:61204
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 11:09:59 +00:00
Thomas Browder 941387dfa7 turn off pretty_print
svn:revision:61203
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 11:08:30 +00:00
Thomas Browder cc703efd86 use new consolidated functions
svn:revision:61201
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 01:13:45 +00:00
Thomas Browder 8e1ddc5ec9 make an array of keys for setting type map checking order
svn:revision:61200
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 01:12:56 +00:00
Thomas Browder b4344140f8 stub in new functions for final conversion
svn:revision:61199
svn:branch:d-binding
svn:account:tbrowder2
2014-06-10 01:11:54 +00:00
Thomas Browder bbb5b372cc move C to D type maps to globals module
svn:revision:61198
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 23:19:41 +00:00
Thomas Browder f50be24af4 turn on D pretty printing
svn:revision:61197
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 23:02:56 +00:00
Thomas Browder 37cf22cb01 now distinguish between C and D code (a WIP)
svn:revision:61196
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 22:49:12 +00:00
Thomas Browder f71fc9b948 tweak the object lines; fill in the actual pretty printing function
svn:revision:61192
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 22:01:49 +00:00
Thomas Browder 516528da5c revert to full object analysis
svn:revision:61191
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 22:00:27 +00:00
Thomas Browder bb3aa1dfa4 pretty print to a file
svn:revision:61190
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 21:50:53 +00:00
Thomas Browder 5cb86cba91 remove spaces before parens
svn:revision:61188
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 21:07:58 +00:00
Thomas Browder c14e4a2e20 add the object pretty printing; add '-x c' option for gcc
svn:revision:61187
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 20:48:37 +00:00
Thomas Browder 843342faee add pretty printing and extraction
svn:revision:61186
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 20:47:01 +00:00
Thomas Browder 2f1751808d use the pretty_print option; document the test option; add a short test file
svn:revision:61185
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 20:45:59 +00:00
Thomas Browder 5affc0e858 add a pretty_print option
svn:revision:61184
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 20:44:22 +00:00
Thomas Browder 9f4fa1cb0f add some blank lines
svn:revision:61183
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 20:41:39 +00:00
Thomas Browder dbb40f3a41 forgot true ending
svn:revision:61182
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 20:19:18 +00:00
Thomas Browder 32cba07c2f move useful funcs into own module for sharing
svn:revision:61181
svn:branch:d-binding
svn:account:tbrowder2
2014-06-09 20:15:51 +00:00
Thomas Browder d408cd4e65 update ignored files
svn:revision:61166
svn:branch:d-binding
svn:account:tbrowder2
2014-06-06 14:58:10 +00:00
Thomas Browder 0e09298946 continue making mods to handle C or D grammar
svn:revision:61165
svn:branch:d-binding
svn:account:tbrowder2
2014-06-06 14:57:18 +00:00
Thomas Browder ac78f82469 update the comment
svn:revision:61164
svn:branch:d-binding
svn:account:tbrowder2
2014-06-06 11:39:00 +00:00
Thomas Browder 1126d4854f rename file to relect its purpose; add capability to handle on of two grammars: C or D
svn:revision:61163
svn:branch:d-binding
svn:account:tbrowder2
2014-06-06 11:32:00 +00:00
Thomas Browder c490298a43 rename file to relect its purpose; add capability to handle on of two grammars: C or D (preliminary file move commit) 2014-06-06 11:32:00 +00:00
Thomas Browder 8cce6850fb add D grammar in BNF form
svn:revision:61161
svn:branch:d-binding
svn:account:tbrowder2
2014-06-06 10:58:59 +00:00
Thomas Browder 7b9b2382df put debug dump code into a subroutine
svn:revision:61150
svn:branch:d-binding
svn:account:tbrowder2
2014-06-05 22:39:35 +00:00
Thomas Browder dca186e061 start working on the real purpose of the program: converting grammar formats
svn:revision:61144
svn:branch:d-binding
svn:account:tbrowder2
2014-06-05 18:36:33 +00:00
Thomas Browder 37eb671823 add two new (to me) modules from Damian Conway
svn:revision:61142
svn:branch:d-binding
svn:account:tbrowder2
2014-06-05 18:14:14 +00:00
Thomas Browder 5c103f76c6 add ending msg
svn:revision:61141
svn:branch:d-binding
svn:account:tbrowder2
2014-06-05 17:52:21 +00:00
Thomas Browder 39f73d1d88 start using new Perl features such as 'say <string>' instead of 'print <string newline>
svn:revision:61140
svn:branch:d-binding
svn:account:tbrowder2
2014-06-05 17:38:51 +00:00
Thomas Browder b0d32ce1fe update info
svn:revision:61139
svn:branch:d-binding
svn:account:tbrowder2
2014-06-05 17:36:11 +00:00
Thomas Browder 7d41e65cb7 update data flow; put parse tree actions in an if block for action only if parse is successful
svn:revision:61130
svn:branch:d-binding
svn:account:tbrowder2
2014-06-05 01:39:45 +00:00
Thomas Browder 92015b36b8 work and data flow looking better--still deciding on intermediate files and formats
svn:revision:61120
svn:branch:d-binding
svn:account:tbrowder2
2014-06-04 19:17:41 +00:00
Thomas Browder e968b6f179 work flow back on track--will need another intermediate file since the current C grammar parser can't handle comments
svn:revision:61105
svn:branch:d-binding
svn:account:tbrowder2
2014-06-04 14:25:54 +00:00
Thomas Browder 84b47ed710 remove parsing from chunk extraction module (decouple the two independent processes); better handle processing flow (a WIP)
svn:revision:61099
svn:branch:d-binding
svn:account:tbrowder2
2014-06-04 11:40:43 +00:00
Thomas Browder 04f2026166 new option '-n=X' for number of chunks; eliminate chunkparse option
svn:revision:61098
svn:branch:d-binding
svn:account:tbrowder2
2014-06-04 11:38:58 +00:00
Thomas Browder e39385cfdb correct comment
svn:revision:61070
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 20:03:48 +00:00
Thomas Browder e63d29b86b now all issues are solved--reads and writes grammar correctly
svn:revision:61069
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 18:48:26 +00:00
Thomas Browder 7cf8b8ab03 whew, formatting issues solved, still no WHILE
svn:revision:61068
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 18:29:20 +00:00
Thomas Browder 0272153b00 issues still open
svn:revision:61067
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 17:55:12 +00:00
Thomas Browder 24e3328da9 restore spaces for the productions in CAPS
svn:revision:61062
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 14:49:45 +00:00
Thomas Browder b0922c00ca replace leading spaces with tabs for ease of reproducing
svn:revision:61061
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 14:42:17 +00:00
Thomas Browder ff381330c3 reading grammar mostly ok but one issue remains (plus minor formatting differences): WHILE is being missed
svn:revision:61060
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 12:21:46 +00:00
Thomas Browder a82a121372 rename to clarify contents
svn:revision:61059
svn:branch:d-binding
svn:account:tbrowder2
2014-06-02 10:24:43 +00:00
Thomas Browder 65f3b314e4 zeroing in on it
svn:revision:61053
svn:branch:d-binding
svn:account:tbrowder2
2014-06-01 23:46:33 +00:00
Thomas Browder b95d782b47 getting a grip on analyzing the C grammar file
svn:revision:61051
svn:branch:d-binding
svn:account:tbrowder2
2014-06-01 22:59:03 +00:00
Thomas Browder 2435d028ea simplify function names; start adding capability for full-header parser processing rather than in chunks
svn:revision:61050
svn:branch:d-binding
svn:account:tbrowder2
2014-06-01 20:16:09 +00:00
Thomas Browder 9bb41d07ef thanks to Perl module Data::Structure::Util I can now read the C syntax tree--a necessary step to getting acces to parts to modify for conversion to D
svn:revision:61049
svn:branch:d-binding
svn:account:tbrowder2
2014-06-01 19:52:13 +00:00
Thomas Browder b907be8fc4 convert to an argref for CExtract function args; close in D.pm
svn:revision:61048
svn:branch:d-binding
svn:account:tbrowder2
2014-06-01 17:25:29 +00:00
Thomas Browder 3e121e6c6c save work; improving syntax tree inspection
svn:revision:61047
svn:branch:d-binding
svn:account:tbrowder2
2014-06-01 17:03:09 +00:00
Thomas Browder 3787636ca1 one chunk processing still not working--invesigating
svn:revision:61045
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 20:34:28 +00:00
Thomas Browder 1a2334140b add another option for devel; correct module names in option vars; trying to isolate first C header chunk
svn:revision:61044
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 20:10:45 +00:00
Thomas Browder cf4bd16fef put var in lexical scope; enable early end if parse fails
svn:revision:61043
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 19:27:59 +00:00
Thomas Browder ac12b4987a put var in lexical scope
svn:revision:61042
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 19:25:23 +00:00
Thomas Browder 889572ccc2 add more options for development
svn:revision:61041
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 19:23:46 +00:00
Thomas Browder fa3866c33b add more options for development
svn:revision:61040
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 19:23:06 +00:00
Thomas Browder 8582591d29 move more globals to the G module
svn:revision:61039
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 18:53:53 +00:00
Thomas Browder d6ff33d13c add ability to declare number of chunks to attemtpt
svn:revision:61038
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 18:40:43 +00:00
Thomas Browder eef1df6abe refactoring; debugging
svn:revision:61037
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 16:04:57 +00:00
Thomas Browder be0efd42d1 add new globals module
svn:revision:61036
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 16:03:33 +00:00
Thomas Browder 93fa8acb56 correct C-to-D map hash names; rename key2 to reflect BRL-CAD specificity
svn:revision:61035
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 13:11:20 +00:00
Thomas Browder a1f6ffd0c2 add C reserved words; mapping from C to D for types; distinguish BRL-CAD types (plan to add new ones as discovered)
svn:revision:61032
svn:branch:d-binding
svn:account:tbrowder2
2014-05-31 11:42:29 +00:00
Thomas Browder 69e57d3876 clean up white space handling; use the correct final string for a processed object
svn:revision:61029
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 23:19:39 +00:00
Thomas Browder 2351744056 correct output line numbering
svn:revision:61028
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 23:05:34 +00:00
Thomas Browder 82577a2182 use the correct array for final output
svn:revision:61027
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 23:02:05 +00:00
Thomas Browder 700ce342ef correct formatting in print statement
svn:revision:61026
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 22:58:30 +00:00
Thomas Browder 4797b6c6e1 remove dead code; correct puntuation in arrays
svn:revision:61025
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 22:57:37 +00:00
Thomas Browder 2a0466d7d2 outout processed lines to the final .d file
svn:revision:61020
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 20:31:49 +00:00
Thomas Browder 245cc19205 send ouput to array
svn:revision:61019
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 20:10:28 +00:00
Thomas Browder 8e74baefed comment unused code; in convert1final use arrays for output
svn:revision:61018
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 20:09:24 +00:00
Thomas Browder af2512089f rename vars for current package name; isolate parsing code to the convert1final subroutine
svn:revision:61015
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 17:29:54 +00:00
Thomas Browder cf1600d01f add info
svn:revision:61014
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 17:28:37 +00:00
Thomas Browder af3fb6e8a4 add chunkparse for the develop option
svn:revision:61013
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 17:13:06 +00:00
Thomas Browder 75ea78099e improve intermediate file naming and handling; eliminate some unneeded code; comment out code that may never be used
svn:revision:61012
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 17:01:44 +00:00
Thomas Browder 4562ca6a4b use better empty-line determination
svn:revision:61011
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 16:38:08 +00:00
Thomas Browder add08fb01a use improved comment stripper
svn:revision:61010
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 16:22:43 +00:00
Thomas Browder 7f9291e6d9 add more debugging code
svn:revision:61009
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:56:49 +00:00
Thomas Browder 796184bf3b add catchall option; correct empty line determination
svn:revision:61008
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:39:40 +00:00
Thomas Browder 38a0b30bc1 rename CParse.pm to CExtract.pm to better indicate purpose; change package name where used or identified
svn:revision:61007
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:17:59 +00:00
Thomas Browder a088eff3e6 rename CParse.pm to CExtract.pm to better indicate purpose; change package name where used or identified (preliminary file move commit) 2014-05-30 15:17:59 +00:00
Thomas Browder 2313893e1e improve help and option handling
svn:revision:61006
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:13:41 +00:00
Thomas Browder 729a56ef60 add new chunkparse option
svn:revision:61005
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:12:40 +00:00
Thomas Browder 336e9078bf play with Data::Dumper options
svn:revision:61004
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:11:57 +00:00
Thomas Browder 1536cac896 add and start implementing new option for chunk parsing to ease analyzing syntax tree
svn:revision:61003
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:11:06 +00:00
Thomas Browder 34ba909ae3 restore module to its original purpose: extracting C objects fom a header for partial P::RD parsing
svn:revision:61000
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 15:01:01 +00:00
Thomas Browder 32954f7a9a default should be 0
svn:revision:60999
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 14:44:44 +00:00
Thomas Browder 8781a2ef73 add info
svn:revision:60998
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 14:43:57 +00:00
Thomas Browder 574b292c84 add info on plans
svn:revision:60994
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 11:39:31 +00:00
Thomas Browder 3a4ed678c9 working on parsing routine
svn:revision:60993
svn:branch:d-binding
svn:account:tbrowder2
2014-05-30 01:29:34 +00:00
Thomas Browder 74160bf14d remove extra spaces
svn:revision:60983
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 21:44:33 +00:00
Thomas Browder 522d872980 start a grammar extractor
svn:revision:60982
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 21:43:57 +00:00
Thomas Browder f58f62d3d2 change function name to reflect purpose
svn:revision:60974
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 21:03:04 +00:00
Thomas Browder 7bc8a5abf1 comment out bad code temporarily
svn:revision:60972
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:42:19 +00:00
Thomas Browder c96949e85f add missing backslashes and % doubler; add to comment and correct typo
svn:revision:60971
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:41:32 +00:00
Thomas Browder d7f6ae0d6a rename to better reflect purpose is to gen multiple modules
svn:revision:60970
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:30:38 +00:00
Thomas Browder b89dc57f54 tidy output msg
svn:revision:60969
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:29:45 +00:00
Thomas Browder 4baccb2c18 update ignore list
svn:revision:60968
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:18:25 +00:00
Thomas Browder a14aff8c09 stuff old code away; rename functions for clarity
svn:revision:60967
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:17:08 +00:00
Thomas Browder c7c27bf69b add the second grammar version to the auto-gen script
svn:revision:60966
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:15:18 +00:00
Thomas Browder 4b3926cf51 remove old manual parsing code; refactor module for handling the P::RD parse tree
svn:revision:60965
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:14:27 +00:00
Thomas Browder df9dd97894 remove old, unused code
svn:revision:60964
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:12:21 +00:00
Thomas Browder 51833e43a2 add a function to the C header to test function parsing during development
svn:revision:60963
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:07:37 +00:00
Thomas Browder ce0267f64e start another grammar version for manual production rules
svn:revision:60962
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:06:20 +00:00
Thomas Browder 122d81b61d add note to avoid confusion
svn:revision:60961
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 20:05:12 +00:00
Thomas Browder 5c9898f7ec remove unhelpful file
svn:revision:60954
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 17:48:09 +00:00
Thomas Browder a893921606 eliminate unneeded code
svn:revision:60949
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 15:57:28 +00:00
Thomas Browder 5be23a6e2f working on a syntax tree inspector routine--first step in deciding on class construction
svn:revision:60948
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 15:47:16 +00:00
Thomas Browder 755420b1c4 remove obsolete module
svn:revision:60947
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 15:05:24 +00:00
Thomas Browder 6857cd1d1e remove unneeded subroutines; comment out possibly unneeded code
svn:revision:60946
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 15:04:30 +00:00
Thomas Browder 7ffdcce7eb finally getting a good autotree dump of entire parse tree
svn:revision:60945
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 13:36:49 +00:00
Thomas Browder 9821e3c861 now have working process for extracting parsed node data--need to expand to more nodes
svn:revision:60944
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 12:51:30 +00:00
Thomas Browder a42aab645e collecting more parse info
svn:revision:60943
svn:branch:d-binding
svn:account:tbrowder2
2014-05-29 02:15:35 +00:00
Thomas Browder a2545327da save work--now have some communication with the CGrammer module in the calling function--hurray
svn:revision:60932
svn:branch:d-binding
svn:account:tbrowder2
2014-05-28 17:26:30 +00:00
Thomas Browder f4ab2e60d4 rename Perl module for clarity; change to the new name inside modules using it
svn:revision:60930
svn:branch:d-binding
svn:account:tbrowder2
2014-05-28 15:37:32 +00:00
Thomas Browder 6f83ecfb7a change package name before renaming file
svn:revision:60929
svn:branch:d-binding
svn:account:tbrowder2
2014-05-28 15:32:58 +00:00
Thomas Browder ac26d90977 add ignores
svn:revision:60928
svn:branch:d-binding
svn:account:tbrowder2
2014-05-28 15:28:32 +00:00
Thomas Browder fbae73e6d8 turn off execution--using for inspiration and code reuse only
svn:revision:60927
svn:branch:d-binding
svn:account:tbrowder2
2014-05-28 15:24:23 +00:00
Thomas Browder 8b7f4af58e add more ignores
svn:revision:60921
svn:branch:d-binding
svn:account:tbrowder2
2014-05-28 11:43:38 +00:00
Thomas Browder 32d1faaac6 add file from P::RD source
svn:revision:60920
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 23:00:47 +00:00
Thomas Browder a341fcea86 save work
svn:revision:60919
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:58:51 +00:00
Thomas Browder f8df020c8b ignore files
svn:revision:60918
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:58:14 +00:00
Thomas Browder 7c1e508c13 make demo work without args
svn:revision:60917
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:55:57 +00:00
Thomas Browder eac22af6b0 add more data output to see what's taking place
svn:revision:60916
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:54:58 +00:00
Thomas Browder dbb64f5883 reformat doc lines to be readable in a reasonable window width
svn:revision:60915
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:53:42 +00:00
Thomas Browder aeb8cf9a3e make demo with no args do something
svn:revision:60914
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:52:16 +00:00
Thomas Browder 068ad61fe2 make demo with no args do something
svn:revision:60913
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:51:48 +00:00
Thomas Browder a543755210 make demo with no args do something
svn:revision:60912
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:51:01 +00:00
Thomas Browder 1922e3ef77 correct var name
svn:revision:60911
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:49:46 +00:00
Thomas Browder 2a2b1b021d add missing apostrophe; tidy format a bit
svn:revision:60910
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:49:09 +00:00
Thomas Browder ea3881844c put a limit on the output; separate compound assignment statement
svn:revision:60909
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:47:20 +00:00
Thomas Browder 994ff003ae fill in the blanks for a working program
svn:revision:60908
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 22:45:43 +00:00
Thomas Browder b931972b43 can't use switches with the env method
svn:revision:60894
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 14:28:01 +00:00
Thomas Browder c3a9086317 add master script to run all demos
svn:revision:60892
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 13:57:35 +00:00
Thomas Browder 4ef06c450f make scripts self-executable
svn:revision:60891
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 13:56:27 +00:00
Thomas Browder eb32742eda rename to avoid confusion with executable scripts
svn:revision:60890
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 13:55:24 +00:00
Thomas Browder 3b31e86b67 split Perl script into an executable and a README
svn:revision:60889
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 13:37:51 +00:00
Thomas Browder 8640e86732 split Perl script into an executable and a README as the original author suggested
svn:revision:60888
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 13:32:02 +00:00
Thomas Browder b4d0c5159a add original demos from P::RD current source on githup
svn:revision:60887
svn:branch:d-binding
svn:account:tbrowder2
2014-05-27 13:21:06 +00:00
Thomas Browder 3927e239d7 better parsing--most C code recognized
svn:revision:60882
svn:branch:d-binding
svn:account:tbrowder2
2014-05-26 13:26:10 +00:00
Thomas Browder 72a9afc7e2 ignore the auto-generated file
svn:revision:60870
svn:branch:d-binding
svn:account:tbrowder2
2014-05-25 21:06:31 +00:00
Thomas Browder f554940385 be sure to return last_index to make read progress
svn:revision:60869
svn:branch:d-binding
svn:account:tbrowder2
2014-05-25 21:05:27 +00:00
Thomas Browder 3602f85cbb use a shell script to generate a compiled C grammar Perl module
svn:revision:60868
svn:branch:d-binding
svn:account:tbrowder2
2014-05-25 21:04:38 +00:00
Thomas Browder f099b5cad6 remove grammar from module and put in a text file for later processing
svn:revision:60867
svn:branch:d-binding
svn:account:tbrowder2
2014-05-25 21:03:31 +00:00
Thomas Browder 531d0f17ad save work
svn:revision:60829
svn:branch:d-binding
svn:account:tbrowder2
2014-05-23 14:39:20 +00:00
Thomas Browder ba8502a8c3 good object parse ID from bu.h
svn:revision:60811
svn:branch:d-binding
svn:account:tbrowder2
2014-05-23 02:45:44 +00:00
Thomas Browder 910cec73cb move RD examples to won sub-dir
svn:revision:60790
svn:branch:d-binding
svn:account:tbrowder2
2014-05-22 12:47:51 +00:00
Thomas Browder 91e5392f23 add a new module to encapsulate a C parser
svn:revision:60788
svn:branch:d-binding
svn:account:tbrowder2
2014-05-22 12:44:50 +00:00
Thomas Browder fffc551e34 add another example of Parse-RecDescent use
svn:revision:60786
svn:branch:d-binding
svn:account:tbrowder2
2014-05-22 12:44:00 +00:00
Thomas Browder 9abd13645c make prog a usable one
svn:revision:60785
svn:branch:d-binding
svn:account:tbrowder2
2014-05-22 12:42:49 +00:00
Thomas Browder c4f16eec4b make a new test option for ease of development
svn:revision:60784
svn:branch:d-binding
svn:account:tbrowder2
2014-05-22 12:41:58 +00:00
Thomas Browder 641d929fad correct var names; playing with conversion routines (WIP)
svn:revision:60782
svn:branch:d-binding
svn:account:tbrowder2
2014-05-22 12:41:09 +00:00
Thomas Browder a7206d520f save work--working on C parsing solutions using Damian Conway;s Parser::RecDescent
svn:revision:60775
svn:branch:d-binding
svn:account:tbrowder2
2014-05-21 21:15:09 +00:00
Thomas Browder 133e9dbba8 add exmple C parser from CPAN.org
svn:revision:60773
svn:branch:d-binding
svn:account:tbrowder2
2014-05-21 20:05:23 +00:00
Thomas Browder 9317cc6b35 save ignore info
svn:revision:60767
svn:branch:d-binding
svn:account:tbrowder2
2014-05-21 14:58:26 +00:00
Thomas Browder 44ab21e252 formalize generating modules of treee data; improve usage var
svn:revision:60766
svn:branch:d-binding
svn:account:tbrowder2
2014-05-21 14:44:51 +00:00
Thomas Browder 307fe8455c add class module for parsing header objects
svn:revision:60765
svn:branch:d-binding
svn:account:tbrowder2
2014-05-21 14:41:51 +00:00
Thomas Browder dcb5895497 collect unknown keys2 and insert into CParse.pm; update new module references
svn:revision:60751
svn:branch:d-binding
svn:account:tbrowder2
2014-05-20 14:04:26 +00:00
Thomas Browder 4734dee9a6 track needed work
svn:revision:60749
svn:branch:d-binding
svn:account:tbrowder2
2014-05-20 10:51:54 +00:00
Thomas Browder cfa374fcb6 put storage info for paths into own module
svn:revision:60748
svn:branch:d-binding
svn:account:tbrowder2
2014-05-20 01:49:41 +00:00
Thomas Browder afcf863b6a add hash of Phobos (D std library) module names
svn:revision:60745
svn:branch:d-binding
svn:account:tbrowder2
2014-05-20 00:05:03 +00:00
Thomas Browder 1399ef710c check point a good waypoint; new module for path handling abstraction
svn:revision:60744
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 23:52:05 +00:00
Thomas Browder a76a8c28e6 redesigning layout and module mapping for better generality
svn:revision:60742
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 23:14:56 +00:00
Thomas Browder 95b70d425e plan is coming together
svn:revision:60735
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 21:13:34 +00:00
Thomas Browder d6f3f2940e save work--method 1 is looking hopeful...
svn:revision:60727
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 18:59:11 +00:00
Thomas Browder 0d7e7a6ff6 add a module for parsing-specific code
svn:revision:60726
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 18:58:20 +00:00
Thomas Browder 7e92098753 concentrating on method 1 now as most likely without external help
svn:revision:60721
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 16:15:06 +00:00
Thomas Browder d1fd349d6e getting some info from gcc parser...
svn:revision:60715
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 12:39:40 +00:00
Thomas Browder a547a34511 add function and new Perl module to parse the tu file (conversion method 3)
svn:revision:60714
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 12:12:21 +00:00
Thomas Browder 32f03554c4 add new reference to help
svn:revision:60713
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 11:16:48 +00:00
Thomas Browder af5caf7356 adding 3rd conversion method using GCC::TranslationUnit; improve arg input choice of conversion method
svn:revision:60712
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 11:14:11 +00:00
Thomas Browder 2c77cb63c6 begin a function to extract a C statement from a header
svn:revision:60711
svn:branch:d-binding
svn:account:tbrowder2
2014-05-19 01:27:54 +00:00
Thomas Browder 13c50d6c59 tidy format
svn:revision:60710
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 23:52:51 +00:00
Thomas Browder f79100269d more refactoring and generalizing
svn:revision:60709
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 23:38:33 +00:00
Thomas Browder 9badd6fbac refactoring to have a master convert function which iterates over the input files and chooses actions and conversion functions based on the conversion method selected
svn:revision:60708
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 23:14:03 +00:00
Thomas Browder de1d6cac1e bail with fatal error if no mode is selected
svn:revision:60707
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 21:09:20 +00:00
Thomas Browder 83186dd2db add code for 2nd conversion method; remove file flattening code into own function
svn:revision:60706
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 21:04:29 +00:00
Thomas Browder 035e3d1d41 keep notes on development
svn:revision:60705
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 19:02:26 +00:00
Thomas Browder 98fe3329fe correct typo
svn:revision:60704
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 18:09:31 +00:00
Thomas Browder 6fd4789733 currently interface file sources are in a subdir
svn:revision:60703
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 16:06:16 +00:00
Thomas Browder 5eea1c2829 add function to used dstep for conversion
svn:revision:60702
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 16:05:00 +00:00
Thomas Browder 9b0f251b34 refactor the gcc processing code; add more debugging
svn:revision:60701
svn:branch:d-binding
svn:account:tbrowder2
2014-05-18 00:16:22 +00:00
Thomas Browder d7e2dda237 record start of a new included file
svn:revision:60700
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 22:24:24 +00:00
Thomas Browder 0fc00be687 use readline instead of the <> operator to handle array of file handles properly; add more debugging code; add check of header dir sub-dir for handling new format of public headers; using complete file names
svn:revision:60699
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 21:47:28 +00:00
Thomas Browder 65811708b5 add file list to report option; use complete paths for file names
svn:revision:60698
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 21:44:20 +00:00
Thomas Browder 06c9405a92 for development define one input file to use
svn:revision:60697
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 19:34:40 +00:00
Thomas Browder 230fb92bef use the di dir; make suffix defs readonly vars; report which dirs are being used; collect files in defined places (not just local as before)
svn:revision:60696
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 19:31:09 +00:00
Thomas Browder 3a5a4ff6e0 use .d for interface file suffix; use a defined sub-dir for D interface files
svn:revision:60695
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 18:59:19 +00:00
Thomas Browder 15fca74b97 typo
svn:revision:60693
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 18:42:21 +00:00
Thomas Browder 51e85bf1c8 handle the aux headers in a more general manner
svn:revision:60692
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 18:39:21 +00:00
Thomas Browder 6567a53a4d define a hard-wired path for installed BRL-CAD headers; check for the presence of that dir on execution
svn:revision:60691
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 18:30:00 +00:00
Thomas Browder 9111344f0d add a makefile and a D program test driver for libbu
svn:revision:60690
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 18:28:38 +00:00
Thomas Browder fac9f4624d move D bindings code to its own directory
svn:revision:60689
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 14:28:21 +00:00
Thomas Browder 1a0e68e57f eliminate unneeded var as alias for current input file pointer
svn:revision:60687
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 11:58:51 +00:00
Thomas Browder e0e0f31f3d remove tmp intermediate files unless one is debugging
svn:revision:60686
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 11:54:26 +00:00
Thomas Browder e1dcddced8 rename to reflect D convention of interface files with implementation details having a .d suffix instead of a .di (from discussion on D learning e-mail list)
svn:revision:60685
svn:branch:d-binding
svn:account:tbrowder2
2014-05-17 11:44:00 +00:00
Thomas Browder c008252c77 using another intermediate file; getting closer to doing rudimentary D conversions
svn:revision:60671
svn:branch:d-binding
svn:account:tbrowder2
2014-05-16 21:21:44 +00:00
Thomas Browder 0fd5a1d4ed refactor; add a cleaning option; correct file generation object
svn:revision:60659
svn:branch:d-binding
svn:account:tbrowder2
2014-05-16 13:22:22 +00:00
Thomas Browder 79edc85eba move vars and funcs to D module; improve md5hash handling; make file status vars readonly
svn:revision:60658
svn:branch:d-binding
svn:account:tbrowder2
2014-05-16 11:38:43 +00:00
Thomas Browder 3c92bf8b06 add convenience module; include two funcs for easier use of persistent file hashes in one file
svn:revision:60657
svn:branch:d-binding
svn:account:tbrowder2
2014-05-16 10:58:08 +00:00
Thomas Browder 068edf08a1 correct output file handling--next need to process the output file some more
svn:revision:60656
svn:branch:d-binding
svn:account:tbrowder2
2014-05-16 01:26:42 +00:00
Thomas Browder df2ce9971e refactor; working on logic for reprocessing files
svn:revision:60655
svn:branch:d-binding
svn:account:tbrowder2
2014-05-16 01:06:09 +00:00
Thomas Browder 599d34e3a9 rename file for correct interface file suffix convention; more refactoring; correct errors and option handling; tidy help; change all instances of '.d' to '.di' for the correct interface file name convention
svn:revision:60654
svn:branch:d-binding
svn:account:tbrowder2
2014-05-15 22:54:22 +00:00
Thomas Browder ef16b22176 rename file for correct interface file suffix convention; more refactoring; correct errors and option handling; tidy help; change all instances of '.d' to '.di' for the correct interface file name convention (preliminary file move commit) 2014-05-15 22:54:22 +00:00
Thomas Browder 59883a4e94 some refactoring; add long help; define second mode; add option for single file conversion; prepare for multipl conversion methods
svn:revision:60651
svn:branch:d-binding
svn:account:tbrowder2
2014-05-15 21:47:55 +00:00
Thomas Browder 57bec90626 implement '-report' option
svn:revision:60646
svn:branch:d-binding
svn:account:tbrowder2
2014-05-15 20:14:47 +00:00
Thomas Browder 18d2629d0e report header file status
svn:revision:60640
svn:branch:d-binding
svn:account:tbrowder2
2014-05-15 12:29:18 +00:00
Thomas Browder 39d8b83719 add utility to convert .h to .d files for the D language
svn:revision:60639
svn:branch:d-binding
svn:account:tbrowder2
2014-05-14 23:54:47 +00:00
Thomas Browder 5747ee1b0f creating a private branch of trunk for work on D binding
svn:revision:60615
svn:branch:d-binding
svn:account:tbrowder2
2014-05-14 10:15:33 +00:00
849 changed files with 62505 additions and 37934 deletions
-4
View File
@@ -1,4 +0,0 @@
/bin
/lib
/build
/testing
+1 -33
View File
@@ -279,7 +279,6 @@ Schueler, Betty J.
Edwards, Eric
SURVICE Engineering, Inc.
Open Source (Doc Camp)
Kregel, Dwayne
SURVICE Engineering, Inc.
@@ -335,37 +334,6 @@ Perez, Alex
2012 November
Open Source (GCI)
Singh, Harmanpreet
nicknames harmanpreet
2013 October
Open Source (Doc Camp)
Kamga, Isaac
nicknames Izak, iiizzzaaakkk
2013 October
Open Source (Doc Camp)
Check, Nyah
nicknames Ch3ck
2013 October
Open Source (Doc Camp)
Scott Nesbitt
2013 October
Open Source (Doc Camp)
Wood, David
2013 November
Open Source (GCI)
Agarwal, Yatharth
2013 November
Open Source (GCI)
McDonald, Rob
2013 November
Open Source
Tannous, Marc
2014 December
Open Source (GCI)
@@ -794,7 +762,7 @@ nicknames huskmate13
2014 January
Open Source
Granroth, Gustave
Gustave Granroth
2014 May
Open Source
+5 -12
View File
@@ -163,7 +163,7 @@ infrared & shapefactor tools
misc tools
fix_polysolids' : obsolete primitive
remapid : superseded by reid+remat
buffer : unnecessary network/stream buffering tool
buffer : unnecesary network/stream buffering tool
hex : superseded by hexdump
Removed as part of distillation effort [deprecated 7.26]
include/bu/ptbl.h
@@ -246,6 +246,8 @@ include/raytrace.h librt
RT_FREE_TREE -> BU_PUT [deprecation 7.22]
include/bu.h
bu_parse_mm() [deprecated 7.22]
librtserver
becoming stand-alone project, removes optional java dependency [deprecated 7.22]
mged
em, e_muves, l_muves, lm, read_muves, and t_muves MUVES-specific commands [deprecated 7.22]
@@ -392,7 +394,7 @@ Dunn camera and Canon printer tools
genptr_t/GENPTR_NULL
genptr_t -> void* [deprecated 7.16]
include/bu.h
bu_argv0() -> bu_basename(bu_argv0_full_path(), NULL) [deprecated 7.16]
bu_argv0() -> bu_basename(bu_argv0_full_path()); [deprecated 7.16]
include/dm_color.h
dm_color.h -> dm.h [deprecated 7.14]
include/fb.h
@@ -422,7 +424,7 @@ mged
SGI-specific tools
pl-sgi -> pl-fb [deprecated 7.16]
src/gtools
g_diff, g_lint, g_qa, g_transfer -> gdiff, glint, gqa, gtransfer [deprecated 7.14]
g_[toolname] -> g[toolname] [deprecated 7.14]
src/librt/cmd.c
rt_split_cmd() -> bu_argv_from_string() [deprecated 7.12]
any-png.sh
@@ -1208,12 +1210,3 @@ s/bu_dir_list/bu_file_list/g
bu_dir_list -> bu_file_list [7.25]
s/BU_FNMATCH_NOMATCH/1/g
don't use an explicit define for the non-matching case [7.25]
s/bu_basename\(([^\)]*)\)/bu_basename(\1, NULL)/g
pass NULL argument to get a dynamically allocated buffer back [7.25]
7.28
----
s/bu_free_array/bu_free_args/g
fixed misleading name [7.26]
s/(#[[:space:]]*include[[:space:]]+["<])bu\/rb\.h/\1bu\/redblack.h/g
clearer header name [7.26]
+74 -112
View File
@@ -584,45 +584,29 @@ endif(_orig_lang)
# generated packages, the resulting packages may behave badly when installed.
# In particular, RPM packages may improperly reset permissions on core
# directories such as /usr.
function(check_umask umask_val status_var)
macro(CHECK_UMASK umask_val status_var)
string(REGEX REPLACE "[^x]" "" umask_x "${umask_val}")
string(REGEX REPLACE "[^r]" "" umask_r "${umask_val}")
string(LENGTH "${umask_r}" UMASK_HAVE_R)
set(${status_var} 0 PARENT_SCOPE)
set(${status_var} 0)
if(UMASK_HAVE_R AND "${umask_x}" STREQUAL "xxx")
set(${status_var} 1 PARENT_SCOPE)
set(${status_var} 1)
endif(UMASK_HAVE_R AND "${umask_x}" STREQUAL "xxx")
endfunction(check_umask)
# Note - umask is not always an executable, so find_program wont' necessarily
# determine whether the umask check is appropriate. If we don't find an
# executable, follow up to see if we can use sh to get the info.
find_program(UMASK_EXEC umask)
mark_as_advanced(UMASK_EXEC)
if(NOT UMASK_EXEC)
# If we don't have a umask cmd, see if sh -c "umask -S" works
execute_process(COMMAND sh -c "umask -S" OUTPUT_VARIABLE umask_out)
# Check if we've got something that looks like a umask output
if("${umask_out}" MATCHES "^u=.*g=.*o=.*")
set(UMASK_EXEC sh)
set(UMASK_EXEC_ARGS -c "umask -S")
endif("${umask_out}" MATCHES "^u=.*g=.*o=.*")
else(NOT UMASK_EXEC)
set(UMASK_EXEC_ARGS -S)
endif(NOT UMASK_EXEC)
if(UMASK_EXEC)
execute_process(COMMAND ${UMASK_EXEC} ${UMASK_EXEC_ARGS} OUTPUT_VARIABLE umask_curr)
endmacro(CHECK_UMASK)
# Note - umask is not always an executable, so we can't use find_program
# to determine whether the umask check is appropriate.
IF(NOT WIN32)
exec_program(umask ARGS -S OUTPUT_VARIABLE umask_curr)
string(STRIP "${umask_curr}" umask_curr)
check_umask("${umask_curr}" UMASK_OK)
if(NOT UMASK_OK)
CHECK_UMASK("${umask_curr}" UMASK_OK)
if (NOT UMASK_OK)
message(" ")
message(WARNING "umask is set to ${umask_curr} - this setting is not recommended if one of the goals of this build is to generate packages. Use 'umask 022' for improved package behavior.")
if(SLEEP_EXEC)
execute_process(COMMAND ${SLEEP_EXEC} 1)
endif(SLEEP_EXEC)
endif(NOT UMASK_OK)
endif(UMASK_EXEC)
endif (NOT UMASK_OK)
ENDIF(NOT WIN32)
#---------------------------------------------------------------------
# Unfortunately, CMake doesn't give you variables with current day,
@@ -668,14 +652,9 @@ if(CMAKE_CONFIGURATION_TYPES AND NOT "${CMAKE_CONFIGURATION_TYPES}" STREQUAL "De
endif(CMAKE_CONFIGURATION_TYPES AND NOT "${CMAKE_CONFIGURATION_TYPES}" STREQUAL "Debug;Release")
#---------------------------------------------------------------------
# We want to check /usr/local by default, so add it if it exists
if (IS_DIRECTORY /usr/local)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/local)
if (IS_DIRECTORY /usr/local/include)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include)
include_directories(AFTER SYSTEM /usr/local/include)
endif (IS_DIRECTORY /usr/local/include)
endif (IS_DIRECTORY /usr/local)
# We want to check /usr/local by default, so add it
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/local)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include)
#---------------------------------------------------------------------
@@ -1581,21 +1560,8 @@ else()
else("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
CHECK_C_FLAG("std=gnu89")
endif("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
CHECK_CXX_FLAG("std=gnu++11" VARS CXX11_FLAG)
if(NOT CXX11_FLAG)
CHECK_CXX_FLAG("std=gnu++0x" VARS CXX11_FLAG)
if(NOT CXX11_FLAG)
CHECK_CXX_FLAG("std=c++11" VARS CXX11_FLAG)
if(NOT CXX11_FLAG)
CHECK_CXX_FLAG("std=c++0x" VARS CXX11_FLAG)
if(NOT MSVC AND NOT CXX11_FLAG)
message(WARNING "No working C++11 flag found.")
endif(NOT MSVC AND NOT CXX11_FLAG)
endif(NOT CXX11_FLAG)
endif(NOT CXX11_FLAG)
endif(NOT CXX11_FLAG)
CHECK_CXX_FLAG("std=gnu++98")
endif()
# TODO - should be using this with MSVC, but it breaks the BUILD_SLEEP
# try_compile below with errors that appear to be coming from Windows
# headers??
@@ -2010,9 +1976,8 @@ BRLCAD_INCLUDE_FILE(termios.h HAVE_TERMIOS_H)
BRLCAD_INCLUDE_FILE(termlib.h HAVE_TERMLIB_H)
BRLCAD_INCLUDE_FILE(tinfo.h HAVE_TINFO_H)
BRLCAD_INCLUDE_FILE(ulocks.h HAVE_ULOCKS_H)
BRLCAD_INCLUDE_FILE(uuid.h HAVE_UUID_H) # for uuid_generate() on BSD
BRLCAD_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
BRLCAD_INCLUDE_FILE(uuid/uuid.h HAVE_UUID_UUID_H) # for uuid_generate() on Mac & Linux
BRLCAD_INCLUDE_FILE(uuid/uuid.h HAVE_UUID_UUID_H) # for uuid_generate() on Mac & Linux */
BRLCAD_INCLUDE_FILE(windows.h HAVE_WINDOWS_H) # for QueryPerformanceCounter() on Windows
# C++
@@ -2853,6 +2818,8 @@ if(NOT BRLCAD_IS_SUBBUILD)
configure_file("${BRLCAD_CMAKE_DIR}/source_archive_setup.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp/source_archive_setup.cmake" @ONLY)
option(BRLCAD_VERSIONED_RPM_NAME "Incorporate BRL-CAD version into RPM package name" OFF)
mark_as_advanced(BRLCAD_VERSIONED_RPM_NAME)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "BRL-CAD - a powerful cross-platform open source solid modeling system")
set(CPACK_PACKAGE_VENDOR "BRL-CAD Development Team")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README")
@@ -2860,67 +2827,65 @@ if(NOT BRLCAD_IS_SUBBUILD)
set(CPACK_PACKAGE_VERSION_MAJOR ${BRLCAD_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${BRLCAD_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${BRLCAD_VERSION_PATCH})
if(BRLCAD_VERSIONED_RPM_NAME)
set(CPACK_RPM_PACKAGE_NAME "BRL-CAD_${BRLCAD_VERSION}")
endif(BRLCAD_VERSIONED_RPM_NAME)
# By default, we want debugging information
set(CPACK_STRIP_FILES FALSE)
if(UNIX)
set(CPACK_STRIP_FILES TRUE)
endif(UNIX)
# If we're not on Windows, set the install prefix and create
# TGZ and TBZ2 packages by default
if(NOT WIN32)
if(UNIX)
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
endif(UNIX)
if(UNIX AND NOT APPLE)
set(CPACK_GENERATOR TGZ TBZ2)
endif(NOT WIN32)
# If we have RPMBUILD and it's not explicitly disabled, assume we're making an RPM.
find_program(RPMBUILD_EXEC rpmbuild)
mark_as_advanced(RPMBUILD_EXEC)
if(RPMBUILD_EXEC AND NOT CPACK_RPM_SKIP)
find_program(RPMBUILD_EXEC rpmbuild)
mark_as_advanced(RPMBUILD_EXEC)
if(RPMBUILD_EXEC)
# Since RPM packages present a particular problem with bad umask
# settings and RPM package building is enabled, raise the issue again
# with a longer wait time.
if (NOT UMASK_OK)
message(" ")
message(WARNING "umask is set to ${umask_curr} and RPM package building is enabled - this is not a 'standard' umask setting for BRL-CAD RPM packages. Double check that these umask permissions will have the desired results when installed - RPM packages can impact permissions on system directories such as /usr\nIf the umask settings need to be changed, it is recommended that the build directory be cleared and cmake re-run after the umask setting has been changed.")
if(SLEEP_EXEC)
execute_process(COMMAND ${SLEEP_EXEC} 5)
endif(SLEEP_EXEC)
endif (NOT UMASK_OK)
# Build an RPM by default if we have the tool. Out of the box, just
# build a "vanilla" RPM. For situations where we want more detail
# and versioning of the RPM, set the variable CMAKE_RPM_VERSION
# to the numerical "version" of the RPM: 1, 2, etc..
# Since RPM packages present a particular problem with bad umask
# settings and RPM package building is enabled, raise the issue again
# with a longer wait time.
if (NOT UMASK_OK)
message(" ")
message(WARNING "umask is set to ${umask_curr} and RPM package building is enabled - this is not a 'standard' umask setting for BRL-CAD RPM packages. Double check that these umask permissions will have the desired results when installed - RPM packages can impact permissions on system directories such as /usr\nIf the umask settings need to be changed, it is recommended that the build directory be cleared and cmake re-run after the umask setting has been changed.")
if(SLEEP_EXEC)
execute_process(COMMAND ${SLEEP_EXEC} 5)
endif(SLEEP_EXEC)
endif (NOT UMASK_OK)
set(CPACK_GENERATOR ${CPACK_GENERATOR} RPM)
set(CPACK_RPM_PACKAGE_LICENSE "LGPL 2.1")
set(CPACK_RPM_PACKAGE_GROUP "Applications/Engineering")
set(CPACK_GENERATOR ${CPACK_GENERATOR} RPM)
set(CPACK_RPM_PACKAGE_LICENSE "LGPL 2.1")
set(CPACK_RPM_PACKAGE_GROUP "Applications/Engineering")
#set(CPACK_RPM_PACKAGE_NAME "brlcad_${BRLCAD_VERSION_MAJOR}_${BRLCAD_VERSION_MINOR}_${BRLCAD_VERSION_PATCH}")
#if(EXISTS /etc/redhat-release)
# file(READ /etc/redhat-release REDHAT_RELEASE)
# string(REGEX MATCH "[0-9]+" REDHAT_VERSION ${REDHAT_RELEASE})
# string(REGEX MATCH "Enterprise Linux" LINUX_DIST_TYPE ${REDHAT_RELEASE})
# if(LINUX_DIST_TYPE)
# set(LINUX_DIST_TYPE "el")
# else(LINUX_DIST_TYPE)
# set(LINUX_DIST_TYPE "rh")
# endif(LINUX_DIST_TYPE)
# set(CPACK_RPM_PACKAGE_RELEASE 1.${LINUX_DIST_TYPE}${REDHAT_VERSION})
#else(EXISTS /etc/redhat-release)
# #set(CPACK_RPM_PACKAGE_RELEASE 2)
#endif(EXISTS /etc/redhat-release)
endif(RPMBUILD_EXEC)
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
if(CPACK_RPM_VERSION)
set(CPACK_RPM_PACKAGE_NAME "brlcad_${BRLCAD_VERSION_MAJOR}_${BRLCAD_VERSION_MINOR}_${BRLCAD_VERSION_PATCH}")
# If we've got a Redhat release, include some info about the specific release in the name.
# Otherwise, just go generic.
if(EXISTS /etc/redhat-release)
file(READ /etc/redhat-release REDHAT_RELEASE)
string(REGEX MATCH "[0-9]+" REDHAT_VERSION ${REDHAT_RELEASE})
string(REGEX MATCH "Enterprise Linux" LINUX_DIST_TYPE ${REDHAT_RELEASE})
if(LINUX_DIST_TYPE)
set(LINUX_DIST_TYPE "el")
else(LINUX_DIST_TYPE)
set(LINUX_DIST_TYPE "rh")
endif(LINUX_DIST_TYPE)
set(CPACK_RPM_PACKAGE_RELEASE _${CPACK_RPM_VERSION}.${LINUX_DIST_TYPE}${REDHAT_VERSION})
else(EXISTS /etc/redhat-release)
set(CPACK_RPM_PACKAGE_RELEASE _${CPACK_RPM_VERSION})
endif(EXISTS /etc/redhat-release)
endif(CPACK_RPM_VERSION)
endif(RPMBUILD_EXEC AND NOT CPACK_RPM_SKIP)
if(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_${CMAKE_SYSTEM_NAME}_x86${CPACK_RPM_PACKAGE_RELEASE}")
else(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}${CPACK_RPM_PACKAGE_RELEASE}")
endif(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
if(NOT CPACK_RPM_PACKAGE_RELEASE)
set(CPACK_RPM_PACKAGE_RELEASE 1)
endif(NOT CPACK_RPM_PACKAGE_RELEASE)
if(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_x86_${CMAKE_SYSTEM_NAME}_${CPACK_RPM_PACKAGE_RELEASE}")
else(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}_${CMAKE_SYSTEM_NAME}_${CPACK_RPM_PACKAGE_RELEASE}")
endif(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
else(UNIX AND NOT APPLE)
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
endif(UNIX AND NOT APPLE)
if(WIN32)
set(CPACK_GENERATOR NSIS)
@@ -2940,12 +2905,10 @@ if(NOT BRLCAD_IS_SUBBUILD)
set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/misc/wix/brlcad_banner.bmp")
set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/misc/wix/brlcad_dialog.bmp")
endif(BRLCAD_ENABLE_WIX)
if(CMAKE_CL_64)
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_win64")
else(CMAKE_CL_64)
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_win32")
endif(CMAKE_CL_64)
endif(WIN32)
if(CMAKE_CL_64)
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_x64")
endif(CMAKE_CL_64)
set(CPACK_SOURCE_GENERATOR TGZ TBZ2 ZIP)
set(CPACK_SOURCE_PACKAGE_FILE_NAME "brlcad-${BRLCAD_VERSION}")
@@ -2999,7 +2962,6 @@ if(NOT BRLCAD_IS_SUBBUILD)
# CREATE_DISTCHECK(TARGET_SUFFIX CMAKE_OPTS source_dir build_dir install_dir [custom_template])
CREATE_DISTCHECK(default_build_type "-DBRLCAD_BUNDLED_LIBS=AUTO" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" "install")
CREATE_DISTCHECK(no_tk "-DCMAKE_BUILD_TYPE=Debug -DBRLCAD_BUNDLED_LIBS=BUNDLED -DBRLCAD_ENABLE_TK=OFF" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" "install")
CREATE_DISTCHECK(no_strict "-DCMAKE_BUILD_TYPE=Debug -DBRLCAD_BUNDLED_LIBS=BUNDLED -DBRLCAD_ENABLE_STRICT=OFF" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" "install")
CREATE_DISTCHECK(autodetect_debug "-DCMAKE_BUILD_TYPE=Debug -DBRLCAD_BUNDLED_LIBS=AUTO" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" "install")
CREATE_DISTCHECK(autodetect_release "-DCMAKE_BUILD_TYPE=Release -DBRLCAD_BUNDLED_LIBS=AUTO" "${CPACK_SOURCE_PACKAGE_FILE_NAME}" "build" "install")
CREATE_DISTCHECK(odd_pathnames "-DCMAKE_BUILD_TYPE=Debug -DBRLCAD_BUNDLED_LIBS=BUNDLED" "1 Odd_ source dir ++" "1 Odd_ build dir ++" "1 Odd_ install dir ++")
+27 -27
View File
@@ -657,7 +657,7 @@
* [r67988] src/librt/primitives/nmg/nmg_misc.c:
this logic is quite complex. possibly not a proper fix, but we
were looping infinitely over an edgeuse list when trying to close
it when working with fuzing fewer than 3 edges. this successful
it when working with fuzing fewer than 3 edges. this successfull
avoids infinite looping by removing the edge from our remaining
edge list once we tried to process it. problem observed on
patch-g with ch53 model.
@@ -828,7 +828,7 @@
2016-05-24 18:54 starseeker
* [r67956] NEWS, src/libged/clone.c:
If you accidentally tell clone to copy 0 objects it crashed. Return
If you accidently tell clone to copy 0 objects it crashed. Return
RT_DIR_NULL instead.
2016-05-24 18:06 bob1961
@@ -1841,7 +1841,7 @@
src/shapes/wire.c, src/util/azel.c, src/util/bary.c,
src/util/double-asc.c, src/util/gencolor.c:
remove the various 'program continues running statements. while
some that are preceded by a usage statement may be confusing
some that are preceeded by a usage statement may be confusing
when the program doesn't exit, it's similarly redundant to tell
them that the program is running when that is evident (by the
program still running). maybe need to review these to see why
@@ -2752,7 +2752,7 @@
src/librt/search.c, src/librt/search.h:
Add -size and -fsize filters to the search command. The -size
option will filter based on individual object sizes. -fsize, by
comparison, filters based on the 'full' definition of the object
comparison, filters based on the 'full' defintion of the object
based on its hierarchy - i.e., for a comb, it will filter based
on that combs size summed with the sizes of all the objects below
the comb in the hierarchy. These options are intended to help
@@ -3704,7 +3704,7 @@
2016-03-24 16:26 starseeker
* [r67487] src/brlman/CMakeLists.txt, src/brlman/brlman.c:
Checkpoint work on C application version of brlman
Checkpoint work on C application verison of brlman
2016-03-24 15:11 brlcad
@@ -5936,7 +5936,7 @@
2016-03-01 11:40 d_rossberg
* [r67202] regress/icv/CMakeLists.txt:
there is no m35.bw.tbz2 (should it be created/committed in?)
there is no m35.bw.tbz2 (should it be created/commited in?)
2016-03-01 10:09 d_rossberg
@@ -6424,7 +6424,7 @@
2016-02-24 20:47 starseeker
* [r67130] src/libtclcad/tclcad_obj.c:
Not sure if argv[2] is persistent in memory for all uses of
Not sure if argv[2] is persistant in memory for all uses of
go_edited_paths entries - make a copy of the key to be sure and
free it when the values are freed.
@@ -6970,7 +6970,7 @@
* [r67043] doc/trunk_heirarchy.org, sh/CMakeLists.txt,
sh/fs2org.sh:
add script to generate an emacs org mode file representing a file
hierarchy along with the output for trunk
heirarchy along with the output for trunk
2016-02-03 18:57 brlcad
@@ -10597,7 +10597,7 @@
src/tclscripts/helpcomm.tcl, src/tclscripts/helplib.tcl,
src/tclscripts/hoc.tcl, src/tclscripts/igraph/GraphEditor.tcl,
src/tclscripts/igraph/igraph.tcl,
src/tclscripts/lib/Accordion.tcl,
src/tclscripts/lib/Accordian.tcl,
src/tclscripts/lib/CellPlot.tcl,
src/tclscripts/lib/ColorEntry.tcl,
src/tclscripts/lib/ComboBox.tcl, src/tclscripts/lib/Command.tcl,
@@ -11825,7 +11825,7 @@
2015-11-18 15:52 starseeker
* [r66589] include/bu/path.h:
Checkpoint glob work so it doesn't accidentally get committed with
Checkpoint glob work so it doesn't accidently get committed with
other stuff.
2015-11-18 15:30 starseeker
@@ -12645,7 +12645,7 @@
per line and a label with a convention implied for each label
type (e.g., PLATE was n planar points that formed a closed loop
followed by a triple-repeated depth point). to be really useful,
this interface needed to be integrated during acquisition (e.g.,
this interface needed to be integrated during aquisition (e.g.,
with mged running on a tablet) so that error points could be
deleted (instead of having a delete/undo convention in the point
stream) and progress viewed interactively.
@@ -14089,7 +14089,7 @@
2015-09-15 16:18 brlcad
* [r66224] CMakeLists.txt:
sync ; removal, although surprisingly worked
sync ; removal, although suprisingly worked
2015-09-15 16:17 brlcad
@@ -16751,7 +16751,7 @@
* [r65753] src/libanalyze/find_subtracted_shapes.cpp,
src/libanalyze/util.cpp:
This undoubtedly needs a lot of refinement, but get a
This undoubtely needs a lot of refinement, but get a
subtract/no-subtract decision from the ray tracing. Need more
context - for example, need to distinguish when a solid in a
candidate is removing positive material it shouldn't vs.
@@ -17280,7 +17280,7 @@
db/nist/pdf/8.pdf, db/nist/pdf/9.pdf:
NIST has released a number of additional public domain NURBS CAD
files - incorporate into build. The 7-10 assembly files are
currently too slow as STEP files, so they've been added as a
currenly too slow as STEP files, so they've been added as a
single 3dm file which attemps to place them in assembly
positions.
@@ -19734,7 +19734,7 @@
2015-06-15 00:54 starseeker
* [r65292] src/other/libz/CMakeLists.txt:
Don't add zlib1.rc if we're doing the custom command version.
Don't add zlib1.rc if we're doing the custom command verison.
2015-06-15 00:40 starseeker
@@ -23619,7 +23619,7 @@
Code up a proposed replacement for icv_guess_file_format with two
more special purpose functions. It seems cleaner to me to have
the image type identification and the path scrubber as separate
API components, but maybe all possible applications will want
API components, but maybe all possibile applications will want
the filename extracted - needs discussion.
2015-04-27 16:39 starseeker
@@ -23633,7 +23633,7 @@
* [r64736] include/bu/path.h, src/libbu/path.c,
src/libbu/tests/CMakeLists.txt,
src/libbu/tests/bu_path_component.c:
Add the ability to get protocol and address components from
Add the ability to get protocal and address components from
paths, based on the ':' character.
2015-04-27 14:18 carlmoore
@@ -25264,7 +25264,7 @@
functionality (like hostname reporting). plus, they introduce a
new convention in the caller code that complicates usage (HAVE_*
is already supposed to imply whether it's available for use,
i.e., working). we may need to introduce HAVE_DECL_* amendments
i.e., working). we may need to introduce HAVE_DECL_* ammendments
where an interface is available but not declared due to mode of
compilation.
@@ -25306,7 +25306,7 @@
* [r64568] misc/CMake/DiffCache.cmake:
The issue of reconfiguration pops up every now and then - write
out the reasons to a text file when it happens rather than
out the reaons to a text file when it happens rather than
requiring the dev to know to go into DiffCache.cmake and
uncomment the message lines.
@@ -30913,7 +30913,7 @@
* [r63660] src/libged/bot.c:
Checkpoint work done to add a chull option to the bot command
before I accidentally commit it or revert it...
before I accidently commit it or revert it...
2014-12-10 18:58 starseeker
@@ -33047,7 +33047,7 @@
* [r63151] include/bu/defines.h, include/vmath.h:
move INFINITY from libbu to libbn (vmath.h more specifically)
where it seems more appropriate. reviewing all the uses, they
where it seems more apropriate. reviewing all the uses, they
pertain to vmath in nearly all instances.
2014-10-10 19:59 brlcad
@@ -33350,7 +33350,7 @@
2014-10-03 15:31 brlcad
* [r63102] src/burst/grid.c:
use more robust VNEAR_EQUAL instead of the custom and misspelled
use more robust VNEAR_EQUAL instead of the custom and mispelled
'aproximation'
2014-10-03 15:29 brlcad
@@ -36344,7 +36344,7 @@
related to lower-level database handling than it is ray tracing
(arguably should go even lower level but we don't currently have
anything in-between and libbu feels too low. resort the unicode
handling in order of likely occurrence.
handling in order of likely occurence.
2014-09-15 17:46 brlcad
@@ -36515,7 +36515,7 @@
Adding this work for two reasons - 1) even though it is not a
major functionality boost, it does have the potential to collapse
the ogl and wgl dm/fb systems into a single, portable dm/fb and
2) it makes other efforts to actually use the scenegraph simpler
2) it makes other efforts to actually use the scenegraph simplier
from a changeset management perspective. Controlled by the
BRLCAD_ENABLE_OSG flag, which is off by default.
@@ -40400,7 +40400,7 @@
2014-07-24 14:04 vladbogo
* [r61909] src/libfb/if_qt.cpp:
Fixed the display problem that occurred when the window wasn't a
Fixed the display problem that occured when the window wasn't a
square.
2014-07-23 21:55 carlmoore
@@ -40683,7 +40683,7 @@
* [r61840] include/fb.h, src/libdm/dm-qt.cpp, src/libfb/if_qt.cpp:
Implemented a first version of the qt_open_existing function -
raytraced content can be displayed but it disappears when
raytraced content can be displayed but it dissapears when
raytracing is done.
2014-07-18 17:44 carlmoore
@@ -41167,7 +41167,7 @@
* [r61668] src/librt/primitives/brep/brep.cpp:
In crack checking code added additional handling for faces that
are truly adjacent in the BREP topology. Noticed crack issues
are truely adjacent in the BREP topology. Noticed crack issues
when dealing with tiny geometries where near misses with
non-adjacent faces more frequent.
+14 -17
View File
@@ -1401,32 +1401,32 @@ Release steps are as follows:
SFUSERNAME=`ls ~/.subversion/auth/svn.simple/* | xargs -n 1 grep -A4 sourceforge | tail -1`
echo "SFUSERNAME=$SFUSERNAME MAJOR=$MAJOR MINOR=$MINOR PATCH=$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net create
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/brlcad/BRL-CAD\ Source/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/b/br/brlcad/BRL-CAD\ Source/$MAJOR.$MINOR.$PATCH"
# create binary dirs (as needed)
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/brlcad/BRL-CAD\ Runtime\ Libraries/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/brlcad/BRL-CAD\ for\ BSD/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/brlcad/BRL-CAD\ for\ Linux/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/brlcad/BRL-CAD\ for\ Mac\ OS\ X/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/brlcad/BRL-CAD\ for\ Windows/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/b/br/brlcad/BRL-CAD\ Runtime\ Libraries/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/b/br/brlcad/BRL-CAD\ for\ BSD/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Linux/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Mac\ OS\ X/$MAJOR.$MINOR.$PATCH"
ssh -v $SFUSERNAME,brlcad@shell.sf.net mkdir "/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Windows/$MAJOR.$MINOR.$PATCH"
# upload source dist and any binaries
scp brlcad-$MAJOR.$MINOR.$PATCH* "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/brlcad/BRL-CAD\ Source/$MAJOR.$MINOR.$PATCH/."
scp brlcad-$MAJOR.$MINOR.$PATCH* "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ Source/$MAJOR.$MINOR.$PATCH/."
# extract and upload release notes to source dir
cat ../NEWS | tr '\n' '@' | perl -p -e "s/.*?(@---[[:space:]@-]*[0-9]{4}-[0-9]{2}-[0-9]{2}[[:space:]]*Release[[:space:]]*${MAJOR}\.${MINOR}\.${PATCH}[[:space:]@-]*.*?)@---.*/\1/" | tr '@' '\n' > README-${MAJOR}-${MINOR}-${PATCH}.txt
cat ../NEWS | tr '\n' '@' | perl -pi -e "s/.*?(@---[[:space:]@-]*[0-9]{4}-[0-9]{2}-[0-9]{2}[[:space:]]*Release[[:space:]]*${MAJOR}\.${MINOR}\.${PATCH}[[:space:]@-]*.*?)@---.*/\1/" | tr '@' '\n' > README-${MAJOR}-${MINOR}-${PATCH}.txt
echo "Release notes for $MAJOR.$MINOR.$PATCH" && echo "==="
cat README-$MAJOR-$MINOR-$PATCH.txt && echo "==="
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/brlcad/BRL-CAD\ Source/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ Source/$MAJOR.$MINOR.$PATCH/."
# NON-AUTO: Following the NAMING A BINARY RELEASE convention,
# upload any release binaries and platform-specific release notes.
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/brlcad/BRL-CAD\ Runtime\ Libraries/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/brlcad/BRL-CAD\ for\ BSD/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/brlcad/BRL-CAD\ for\ Linux/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/brlcad/BRL-CAD\ for\ Mac\ OS\ X/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/brlcad/BRL-CAD\ for\ Windows/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ Runtime\ Libraries/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ BSD/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Linux/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Mac\ OS\ X/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Windows/$MAJOR.$MINOR.$PATCH/."
# NON-AUTO: Be sure to mark binaries as default download, then
# close shell session
@@ -1456,9 +1456,6 @@ Release steps are as follows:
Slackware maintainer
http://slackbuilds.org/result/?search=brlcad
Fedora maintainer
https://fedoraproject.org/wiki/User:Germano#Contact
#####################################################################
# 18: Announce the new release.
+10
View File
@@ -546,6 +546,16 @@ first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_TINYCTHREAD
--- BRLCAD_FREETYPE ---
Option for enabling and disabling compilation of the FreeType
libraries provided with BRL-CAD's source code. Default is AUTO, responsive to
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_FREETYPE
--- BRLCAD_TERMLIB ---
Option for enabling and disabling compilation of the termlib library
+10 -87
View File
@@ -13,71 +13,25 @@ changes made. See document footer for additional details.
--- 2016-07-XX Release 7.26.2 ---
----------------------------------------------------------------------
* fixed rt support for lights created prior to rel 6.0 - Sean Morrison
* fixed infinite loop bug in when using shadow lights - Sean Morrison
* removed man pages: erase_all, export_body, vrmgr, dall - Cliff Yapp
* added manual pages for the 'brlman' and 'man' commands - Cliff Yapp
* improved gdiff default grid spacing and tolerancing - Cliff Yapp
* updated brlman to support browsing all page categories - Cliff Yapp
* added support for .rtwizardrc configuration file - Cliff Yapp
* renamed MGED gdiff grid spacing -t option to -g - Cliff Yapp
* updated MGED gdiff default drawing options to -l -r - Cliff Yapp
* removed MGED gdiff -R option, now default behavior - Cliff Yapp
* replaced obsolete 'g_diff' manual page with 'gdiff' - Cliff Yapp
* improved 'keep' error message when file is not created - Cliff Yapp
* improved rtwizard window sizing and "RtWizard" titling - Cliff Yapp
* brep command attaches .brep suffix instead of _brep - Sean Morrison
* changed ogl & wgl framebuffer delayed write behavior - Sean Morrison
* upgraded libpng to version 1.6.23 - Cliff Yapp
* upgraded freetype to version 2.6.5 - Cliff Yapp
* upgraded zlib to version 1.2.8 - Cliff Yapp
* fix rtedge foreground/background color options - Jon Engbert
* support rt -C colors specified as 0-255 or 0.0-1.0 - Jon Engbert
----------------------------------------------------------------------
--- 2016-08-08 Release 7.26.0 ---
--- 2016-06-XX Release 7.26.0 ---
----------------------------------------------------------------------
This major release of BRL-CAD culminates several years of development
effort to provide robust explicit boundary representation (BREP)
Non-uniform Rational Basis Spline (NURBS) import and ray tracing
analysis support. Compared to previous polygonal mesh (BoT) methods,
NURBS offer superior interoperability with other CAD systems, faithful
shape-preserving import, and significantly reduced model sizes. NURBS
may be imported from the ISO STEP (AP203) and Rhino 3DM file formats,
both with improved hierarchy preservation and entity support.
This major release update of BRL-CAD culminates several years of
development efforts to provide robust boundary representation (BREP)
NURBS import and ray tracing support. Our NURBS capability gets us a
step closer to full hybrid representation modeling, supporting
seamless transitioning and mixing of boundary representation geometry
(e.g., NURBS or polygonal meshes) with implicit representation
geometry (e.g., primitives with CSG).
Unprecedented in BRL-CAD's history, this release initiates steps to
significantly reduce complexity and improve usability. Many features
are being consolidated, reorganized, and removed via BRL-CAD's
deprecation process. There are widespread documentation system
enhancements including new manual pages, improved command usage,
better help facilities, and more.
This release introduces the 'gcv' and 'icv' tools for geometry and
image conversion respectively. These plugin-architecture tools are
intended to eventually consolidate and replace all of BRL-CAD's
conversion and processing functionality into an easy universal
interface for users and application developers. GCV currently
supports import and export of STL, 3DM, OBJ, VRML, and FASTGEN
geometry as well as mesh decimation, facetization, and solidity
testing. The new FASTGEN exporter implements extensive compatibility
feature mapping for round-trip geometry conversion.
Ray tracing performance on Windows is vastly improved on symmetric
multiprocessing (SMP) multicore and multiple CPU systems. Implemented
as 'datum' objects, BRL-CAD provides new modeling support for
reference points, lines (axes), and planes. Major features still
under experimental development include NURBS Boolean evaluation, a new
marching cubes method for polygonal mesh export, rigging joints for
constrained geometry articulation, and an OpenCL-accelerated high
performance ray tracing pipeline.
* mass-deprecation of 121 command-line utilities - BRL-CAD Developers
* fixed bad args crash in metaball 'in' command - Cliff Yapp
* added manual page for lt comb child listing command - Cliff Yapp
* added lt -c option for specifying separation character - Bob Parker
* mass-deprecation of 121 command-line utilities - BRL-CAD Developers
* improved hierarchy preservation in 3dm-g importer - Jon Engbert
* fixed upside down 'screengrab' images on some platforms - Nick Reed
* updated wireframe drawing to respect primitive colors - Cliff Yapp
@@ -94,16 +48,6 @@ performance ray tracing pipeline.
* extended nirt to list current and available formats - Sean Morrison
* fixed NURBS wireframe drawing crash - Cliff Yapp
* fixed firing of single rays using the rtshot tool - Sean Morrision
* removed pixread.sh, pixwrite.sh; obsolete hardware - Sean Morrison
* removed cray.sh and sgisnap.sh; obsolete hardware - Sean Morrison
* removed cadbug.sh - use sourceforge tracker - Sean Morrison
* removed any-png.sh - use pix tools - Sean Morrison
* removed librtserver interface - Cliff Yapp
* removed MGED per_line command - Sean Morrison
* updated MGED tops command: default to -g -u behavior- Sean Morrison
* removed MGED -n option; use -c instead - Sean Morrison
* removed MGED commands pl, pov and polybinout - Sean Morrison
* removed UtahRLE image tools - Cliff Yapp
* improved rcodes command feedback in the no changes case - Cliff Yapp
* added brlman -S option to specify man page section - Cliff Yapp
* modified rtg3 to avoid outputting excessive LOS - Nick Gerstner
@@ -121,7 +65,6 @@ performance ray tracing pipeline.
* added draw -L# to draw bounding boxes for large objects - Cliff Yapp
* added 3dm-g instance reference and definition import - Jon Engbert
* minor rtwizard graphical user interface reorganization - Cliff Yapp
* fixed rtwizard edge and ghosted image bug on Windows - Bob Parker
* ported 'brlman' manual page viewer with GUI to Windows - Cliff Yapp
* added gdiff -h help command-line option - Cliff Yapp
* added facetize -m marching cubes option - Erik Greenwald
@@ -133,7 +76,6 @@ performance ray tracing pipeline.
* added new algorithm to bot_decimate (via -f option) - Jon Engbert
* fixed benchmark bug running from paths with spaces - Sean Morrison
* fixed adjust command crash when working with BoTs - Daniel Roßberg
* removed fb-orle, orle-fb, orle-pix, and pix-orle tools - Cliff Yapp
* removed support for RLE v1 and v2 ('orle') image format - Cliff Yapp
* fixed datum type 'in' command unit conversion bug - Cliff Yapp
* fixed rpatch / patch-g line handling on Windows - Daniel Roßberg
@@ -145,19 +87,15 @@ performance ray tracing pipeline.
* improved point cloud plot visualization - Sean Morrison
* fixed program freezing bug in MGED grouper command - Bob Parker
* added 'rhc' reporting to analyze command - Kalpit Thakkar
* improved command option and manual page consistency - Carl Moore
* improved help option consistency across numerous tools - Carl Moore
* added prefatory FASTGEN4 geometry export support - Jon Engbert
* added FASTGEN4 illegal thickness CCONE1 entity import - Cliff Yapp
* improved help message for 'tire' command - Cliff Yapp, Carl Moore
* improved option parsing and output options for gencolor - Carl Moore
* fixed saveview usage help string and running from archer - Nick Reed
* fixed and improved killtree man page - Nick Reed
* fixed composition bugs in pixmatte and pixmerge - Carl Moore
* fixed definition of "light year" in unit conversions - Cliff Yapp
* fixed duplicate name errors in dbconcat - Daniel Roßberg
* modernized documents and improved infrastructure - Hitesh Sofat
* added mirroring support for hrt primitive objects - Isaac Kamga
* added manual page documenting the STEP geometry format - Cliff Yapp
* ported the mged Overlap Tool to Windows - Sean Morrison
* improved NURBS prep performance for UV-remapped surfaces - Nick Reed
* fixed dbconcat -c crash when color table does not exist - Nick Reed
@@ -166,7 +104,6 @@ performance ray tracing pipeline.
* updated libregex to apply a fix for CVE-2015-2305 - Cliff Yapp
* upgraded libpng to version 1.6.20 - Cliff Yapp
* added command window option for pasting tree view paths - Nick Reed
* improved 'bb' command digits and units output - Keith Bowman
* improved robustness of bb command oriented box option - Peter Amidon
* added example NURBS B-Rep geometry files from NIST - Cliff Yapp
* removed "high resolution" options from all commands - Carl Moore
@@ -192,15 +129,12 @@ performance ray tracing pipeline.
* renamed 'make_bb' mged command name to 'bb' - Cliff Yapp
* added g-ply exporter for Stanford PLY geometry format - Rishub Jain
* added ply-g importer for Stanford PLY geometry format - Rishub Jain
* improved rtedge help option output - Carl Moore
* fixed texture mapping crash with bad image dimensions - Ștefan Mirea
* fixed g2asc and asc2g handling of dsp primitive - Cliff Yapp
* rewrote gdiff with improved output & reporting options - Cliff Yapp
* fixed pix-ps -S -W -N output size options being ignored - Carl Moore
* fixed crash exporting mixed mode merged BoT meshes - Sean Morrison
* fixed submodel primitive crash - Cliff Yapp, Sean Morrison
* added fbclear command to archer - Bob Parker
* improved rtwizard command-line mode manual page docs - Cliff Yapp
* support non-.g file import in Archer's file open dialog - Cliff Yapp
* added brep support to g2asc and asc2g - Cliff Yapp
* fixed a CPU affinity locking bug on Linux platforms - Sean Morrison
@@ -218,33 +152,22 @@ performance ray tracing pipeline.
* fixed memory leaks in a number of pix utilities - Cezar Elnazli
* improved NURBS ray tracing & tessellation robustness - Keith Bowman
* improved step-g NURBS geometry import robustness - Keith Bowman
* added -f vertex fuse option to obj-g importer - Jon Engbert
* added -v verbose output option to mged 'search' command - Cliff Yapp
* fixed g_lint and pixcount red-black tree memory leaks - Tom Browder
* added conversion time reporting to step-g importer - Keith Bowman
* fixed crash of extrude with special case bezier curves - huskmate13
* improved performance of 'terrain' & numerous shaders - Sean Morrison
* new manual pages for rtexample and brep_simple - Shardul Chiplunkar
* added key binding to reopen/focus mged command window - Emory Huff
* added menu option to restore mged command window - Cezar Elnazli
* improved DocBook documentation output formatting
- David Wood, Yatharth Agarwal
* added 'search' -params option for geometric parameters - Cliff Yapp
* search command now recognizes hyp and metaball types - Cliff Yapp
* improved spec formatting, added v5 timestamp proposal - Tom Browder
* improved search command documentation examples - Cliff Yapp
* improved archer interface's behavior on start-up - Nick Reed
* added -depth option to mged 'search' command - Cliff Yapp
* initial support for rigging joints and constrained articulation
- Nick Reed, Keith Bowman, Cliff Yapp, Sean Morrison
* improved 'search' with 'flat' search path modifier - Cliff Yapp
* improved 'search' with above/equal/below depth limits - Cliff Yapp
* improved support for sub-millimeter (tiny) meshes - Keith Bowman
* added comb -S option to stop when object already exists - Cliff Yapp
* improved comb command documentation with many examples - Cliff Yapp
* implemented new 'hrt' heart-shaped primitive object - Isaac Kamga
* added support for multicore / SMP ray tracing on Windows
- Adrián Calle, Arjun Govindjee, Daniel Roßberg, Sean Morrison
----------------------------------------------------------------------
+75 -60
View File
@@ -18,40 +18,34 @@ tasks as they are completed.
THESE TASKS SHOULD HAPPEN BEFORE THE NEXT RELEASE
-------------------------------------------------
* add regression test for directional light sources
* quick check of CHANGES to make sure user-vis obsoletions are in NEWS
* update astyle
* fix regressions in lc -d and -s options
* bundle primary rays in rt front end into postage stamps, shoot via
rt_shootrays(), modify to pass all rays down through the spatial
partitioning simultaneously
* regressed behavior in mged and archer: they seem to be defaulting
objects to black instead of white/gray. wireframes and default
black-background rendering make newly created objects practically
invisible.
* create a catalog of all possible entity types. including distinct
parameterizations with sufficient variety that conveys the object's
parameterization options (e.g. ell as sphere, flat disc, long spike,
etc.). this is necessarily defined per object type and possibly
programmable. see src/proc-db/csgbrep.cpp for a basic start.
create a BRL-CAD .g with all possible object types embedded.
integrate into testing.
* create a catalog of all possible/distinct/useful shader settings.
see regress/shaders.sh for a basic start.
* readd support for vrml v1 to g-vrml so that users can select whether
they want v2 (default) or previous v1 output format via a
command-line switch. see http://brlcad.svn.sf.net/viewvc/brlcad/brlcad/trunk/conv/g-vrml.c?view=diff&pathrev=22798&r1=16900&r2=16901
* reinstate 'stat' and search -size, see r67636 through r67646
* check these commits for documentation:
58415 - NEWS, attributes are now case-insensitive (test: any or just standard ones?)
58147 - NEWS, improved search command documentation examples
58146 - NEWS, improved archer initialization, removed startup flashing
58145 - NEWS, minor but technically user visible and potentially significant if the assumptions made are incorrect (improved tire command usage statement)
58254 - NEWS, fixed bug you say? what bug?
58325 - NEWS, improved v5 specification formatting, added timestamp proposal
64637 - NEWS, almost certainly fixed mysterious errors during dbconcat and db_opens with duplicate names found
58475 - AUTHORS if user identified the fix (not just the bug), NEWS if g-step considered published
58594, 58608 - AUTHORS for mged tutorial fixes (doc or code contrib section), NEWS if user-vis
61168 - NEWS, new param option to search
64314 - NEWS, announce the new doc
63132 - NEWS, expanded rtedge usage
THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
-------------------------------------------------------
* turn on Bullet code (simulate command) unconditionally
* metaball in command input needs sanity checks and better
validation.
* update astyle
* integrate gen-registered-attributes-html output into website
@@ -63,42 +57,42 @@ THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
$ /usr/brlcad/rel-7.18.0/bin/brlcad-config rt
-L/usr/brlcad/rel-7.18.0/lib -m64 -L/usr/local/lib64 -L/usr/local/lib -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -O3 -w -L/usr/brlcad/rel-7.18.0/lib -lrt -lbn -lbu -ltcl8.5 -ldl -lm -lpng14 -lz -lc -lpthread -lregex -lsysv -lopenNURBS
* OpenCL for enhanced performance boolweave sorting
* bu_*_argv -> bu_argv_*
* create boolweave+boolfinal unit tests to validate weaving behavior
and performance.
* obsd stack crashers
* make sure we can run db_dirbuild() multiple times without creating
duplicate entries.
* rt moss.g facetize rt bot bug
* heap unit test needs to actually compare performance against system
allocation, not just do some work
THESE ARE UNSCHEDULED BACKLOG TASKS
-----------------------------------
* define geometry URL and VFS behavior
* change _mged_ command prefix to a simple '.' prefix to hide/protect
the built-in commands.
* invoke graphical with console, play nicely
* sync tgc/rec shot() behavior, sort results for proper normal.
inspect t62 grazing with r653,r735 (tgc on an arb8) looking at ae0,0
and z=1524 (was hit/overlap, now misses).
* havoc.g s.nos5g reliably exhibits the grazing edge bug where only
one hit point is being returned. to reproduce:
e s.nos5g ; ae 35 25 ; units mm ; center 26912.4 7089.08 7168.96 ; nirt
* reinstate 'stat' and search -size, see r67636 through r67646
* obsd stack crashers
* turn on Bullet code (simulate command) unconditionally
* create a BRL-CAD .g with all possible object types embedded. The
csgbrep command is a good starting point, but only about half of
them.
* bundle primary rays in rt front end into postage stamps, shoot via
rt_shootrays(), modify to pass all rays down through the spatial
partitioning simultaneously
* resolve bot bin sort optimization crash, disabled during release
* closing the graphics window brings down X11 on Mac due to a bad
context. fix or revert recent close window behavior.
* resolve bot bin sort optimization crash, disabled during release
* havoc.g s.nos5g reliably exhibits the grazing edge bug where only
one hit point is being returned. to reproduce:
e s.nos5g ; ae 35 25 ; units mm ; center 26912.4 7089.08 7168.96 ; nirt
* rt moss.g facetize rt bot bug
THESE ARE UNSCHEDULED BACKLOG TASKS
-----------------------------------
* evaluate OpenMesh (http://www.openmesh.org) and OpenFlipper
(http://www.openflipper.org) for smoothing, decimation, and
@@ -116,6 +110,11 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
* implement unit tests for bu dirent / stat API
* OpenCL for enhanced performance boolweave sorting
* create boolweave+boolfinal unit tests to validate weaving behavior
and performance.
* convert src/util/terrain.c to src/shapes/terrain.c writing out the
datafile to a binunif along with a referencing dsp. perhaps add
command line option to skip .g to retain prior datafile capability.
@@ -296,6 +295,15 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
* Document a CLI feature list (prioritized).
* create a catalog of all possible entity types. including distinct
parameterizations with sufficient variety that conveys the object's
parameterization options (e.g. ell as sphere, flat disc, long spike,
etc.). this is necessarily defined per object type and possibly
programmable. see src/proc-db/csgbrep.cpp for a basic start.
* create a catalog of all possible/distinct/useful shader settings.
see regress/shaders.sh for a basic start.
* high-performance VOL for medical data visualization. consider
leveraging OpenVDB, PCL, Paraview/VTK, etc.
@@ -329,12 +337,6 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
functions until it provides some clear advantage (e.g., portability,
performance, and/or maintainability).
* rename the "joint2" articulation command (possibly also rename the
"joint" command) worked on when joint objects were implemented.
joint2 interfaces with the old text-file based articulation
interface, but conceivably should get updated when joint objects can
describe everything in the old text files.
* create a joint articulation (manually is good, automatic is better)
for the tin woodsman so he can move his arms, legs, neck, and head.
@@ -365,6 +367,12 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
* convert all calls to BU_SETJUMP/BU_UNSETJUMP into familiar try/catch
logic layout using if/else.
* heap unit test needs to actually compare performance against system
allocation, not just do some work
* make sure we can run db_dirbuild() multiple times without creating
duplicate entries.
* re-do the sh/enumerate.sh script for CMake
* get bu_extern out of bu/parse.h into its own header file.
@@ -565,6 +573,9 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
is causing ipathpos to get incremented to a number larger than the
number of objects in the full path it's supposed to be referencing.
* change _mged_ command prefix to a simple '.' prefix to hide/protect
the built-in commands.
* refactor rt_mirror (src/librt/primitives/mirror.c) into the functab
* refactor rt_functab accessors to go through an api call or calls so
@@ -735,6 +746,9 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
* fix the "(type)(size_t)val" hacks (using ints like ptrs, etc.)
* Mac OS X mouse input binding problem seems to be back with rotations
stalling during interactive use.
* pixdiff reports bytes, but reports incorrect (off-by-one) bytes for
.bw input files. cause is due to tool assuming input is rgb triplets
(even though output is bytes, wtf?). should probably report pixels
@@ -915,6 +929,10 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
* refactor mged's signal handling to make it possible to safely
interrupt long-running commands
* readd support for vrml v1 to g-vrml so that users can select whether
they want v2 (default) or previous v1 output format via a
command-line switch. see http://brlcad.svn.sf.net/viewvc/brlcad/brlcad/trunk/conv/g-vrml.c?view=diff&pathrev=22798&r1=16900&r2=16901
* make Mac OS X universal binaries actually work.
* fully implement analyze for all primitives
@@ -1350,9 +1368,7 @@ LIBGED
optionally list everything
* improve performance of these commands that seem to have exponential
cost: bot_split, killtree, and
make s sph; make a arb8; sed a; e a; tra 0 0 500; r hemi u s - a; tol norm 1 ; facetize hemi.bot hemi
# compared to tol norm 2, # triangles is up ~20% but facetize is >200%
cost: bot_split, killtree
* translate lc command to libged (discovered in Feb. 2015 to have already
been done -- need information regarding when this was done and committed).
@@ -1824,6 +1840,7 @@ The following binaries are not yet available on Windows. The reason
is identified in parentheses.
bombardier (possibly just a problem with the build logic)
burst (TERMLIB)
enigma (not ported)
fbcolor (TERMLIB)
fbed (TERMLIB)
@@ -1850,9 +1867,6 @@ missing on Windows due to needing lex.
CONVERTERS
----------
* add gcv support for the Microstation file format (DGN), probably
leveraging http://dgnlib.maptools.org/ (MIT-licensed)
* integrate the submitted x3d-g (Web3D, VRML successor) importer
(pending patch on sf)
@@ -2260,6 +2274,7 @@ DOCUMENTATION
archer
bombardier
brlman
damdf
dauto
dauto2
Vendored
+4
View File
@@ -130,6 +130,10 @@ do
shift;;
--disable-tinycthread) options="$options -DBRLCAD_TINYCTHREAD=SYSTEM";
shift;;
--enable-freetype) options="$options -DBRLCAD_FREETYPE=BUNDLED";
shift;;
--disable-freetype) options="$options -DBRLCAD_FREETYPE=SYSTEM";
shift;;
--enable-termlib) options="$options -DBRLCAD_TERMLIB=BUNDLED";
shift;;
--disable-termlib) options="$options -DBRLCAD_TERMLIB=SYSTEM";
-1
View File
@@ -8,7 +8,6 @@ set(G_BENCHMARK_MODELS
)
set(G_SAMPLE_MODELS
aet.asc
axis.asc
boolean-ops.asc
castle.asc
-68
View File
@@ -1,68 +0,0 @@
title {Untitled BRL-CAD Database}
units mm
put {xyzringtrc.s} tgc V {0.31168735027313232421875 0.31356084346771240234375 0.2343517243862152099609375} H {-0.02296111360192298889160156 -0.02476786263287067413330078 0.03948847576975822448730469} A {-0.003937630914151668548583984 -0.02411045134067535400390625 -0.01741208322346210479736328} B {0.02662250958383083343505859 -0.01068659685552120208740234 0.008777192793786525726318359} C {-3.937628207495436072349548E-05 -0.0002411044843029230833053589 -0.0001741207961458712816238403} D {0.0002662249607965350151062012 -0.0001068659257725812494754791 8.77717902767471969127655E-05}
put {viewdirtrc.s} tgc V {0.08660250157117843627929688 0.08660250157117843627929688 0.08660250157117843627929688} H {-0.07794228941202163696289062 -0.07794228941202163696289062 -0.07794228941202163696289062} A {0 0.02828427031636238098144531 -0.02828427031636238098144531} B {0.03265986219048500061035156 -0.01632993109524250030517578 -0.01632993109524250030517578} C {0 0.000212132028536871075630188 -0.000212132028536871075630188} D {0.0002449489838909357786178589 -0.0001224744919454678893089294 -0.0001224744919454678893089294}
put {twistpanel.r} comb region yes tree {l twistpanel.c}
attr set {twistpanel.r} {color} {232/198/232} {shader} {glass {tr 0.6}} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
put {xyzringcut.c} comb region no tree {- {- {- {- {- {- {- {- {- {- {l ringxyztor.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut4.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l viewdirrcc.s}} {l xyzcutrcc.s}} {l xyzringtrc.s}}
put {viewdirrcc.s} tgc V {0.779421329498291015625 0.779421329498291015625 0.779421329498291015625} H {-0.6928203105926513671875 -0.6928203105926513671875 -0.6928203105926513671875} A {0 0.007071067579090595245361328 -0.007071067579090595245361328} B {0.008164965547621250152587891 -0.004082482773810625076293945 -0.004082482773810625076293945} C {0 0.007071067579090595245361328 -0.007071067579090595245361328} D {0.008164965547621250152587891 -0.004082482773810625076293945 -0.004082482773810625076293945}
put {twistpanel.c} comb region no tree {- {- {- {l twistrcc.s} {l twisttor.s}} {l twisttrc.s}} {l viewdirrcc.s}}
put {ringxytor.s} tor V {0 0 0} H {0 0 1} r_a 0.5 r_h 0.009999999776482582092285156
put {twistring.r} comb region yes tree {l twistring.c}
attr set {twistring.r} {color} {232/198/232} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
put {xyringtrc.s} tgc V {0.3913685381412506103515625 0.3006020486354827880859375 -0.0009004921885207295417785645} H {-0.03143119439482688903808594 0.04401883110404014587402344 -0.0006720747915096580982208252} A {0.02089671231806278228759766 0.01464617997407913208007812 -0.01800444535911083221435547} B {-0.01446941774338483810424805 -0.01072130445390939712524414 -0.02551533468067646026611328} C {0.0002089670742861926555633545 0.0001464617671445012092590332 -0.0001800443860702216625213623} D {-0.0001446941751055419445037842 -0.0001072130180546082556247711 -0.0002551533398218452930450439}
put {xyzcutrcc.s} arb8 V1 {0.285196959972381591796875 0.223926544189453125 0.2792418301105499267578125} V2 {0.3270788453519344329833984 0.2655878327786922454833984 0.2198253460228443145751953} V3 {0.3691307827830314636230469 0.3075636327266693115234375 0.2788994473521597683429718} V4 {0.3272488489747047424316406 0.2659022919833660125732422 0.3383159413933753967285156} V5 {0.2260562554001808166503906 0.2832767628133296966552734 0.2791691728780278936028481} V6 {0.2679381202906370162963867 0.3249380290508270263671875 0.2197526805102825164794922} V7 {0.3099901042878627777099609 0.366913974285125732421875 0.2788267984578851610422134} V8 {0.2681080885231494903564453 0.3252525255084037780761719 0.3382433503866195678710938}
put {xyringcut.c} comb region no tree {- {- {- {- {- {- {- {- {- {l ringxytor.s} {l cut0.s}} {l cut1.s}} {l cut3.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l ringxyztor.s}} {l xycutrcc.s}} {l xyringtrc.s}}
put {testdisks.c} comb region no tree {u {- {- {- {l xyzrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {- {- {- {- {- {l xyrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut3.s}} {l cut0.s}}}
put {twistring.c} comb region no tree {u {- {- {l twisttor.s} {l twistcut.s}} {l twisttrc.s}} {l twisttrc.s}}
put {halfplane.s} half N {0 0 1} d -0.536277353763580322265625
put {halfplane.r} comb region yes tree {l halfplane.s}
attr set {halfplane.r} {color} {255/255/255} {shader} {stack {{phong {sp 0.05 di 0.95}} }} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
put {twisttor.s} tor V {0.449999988079071044921875 0.449999988079071044921875 0.449999988079071044921875} H {-0.577350269189625731058868 -0.577350269189625731058868 -0.577350269189625731058868} r_a 0.1500000016475442066177237 r_h 0.01000000030444709100962974
put {twistcut.s} part V {0.3950000000000000177635684 0.3850000000000000088817842 0.5649999999999999467092948} H {0.0003640000000000000114804 -0.0003699999999999999946917462 -0.0005000000000000000104083409} r_v 0.02800000000000000058286709 r_h 0.02800000000000000058286709
put {twisttrc.s} tgc V {0.37255561351776123046875 0.40711653232574462890625 0.57051956653594970703125} H {0.03641721233725547790527344 -0.03706122934818267822265625 -0.0005011741304770112037658691} A {0.01779515855014324188232422 0.01750466972589492797851562 -0.001385415205731987953186035} B {0.001156966434791684150695801 0.0007993413601070642471313477 0.02496042102575302124023438} C {0.0001779512967914342880249023 0.0001750463998178020119667053 -1.385413543175673112273216E-05} D {1.156978123617591336369514E-05 7.993325198185630142688751E-06 0.0002496042288839817047119141}
put {xyzpanel.r} comb region yes tree {l xyzcut.c}
attr set {xyzpanel.r} {color} {205/253/172} {shader} {glass {tr 0.6}} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
put {twistrcc.s} tgc V {0.4472982883453369140625 0.4472982883453369140625 0.4472982883453369140625} H {0.005773502867668867111206055 0.005773502867668867111206055 0.005773502867668867111206055} A {0 -0.1060660183429718017578125 0.1060660183429718017578125} B {0.1224744841456413269042969 -0.06123724207282066345214844 -0.06123724207282066345214844} C {0 -0.1060660183429718017578125 0.1060660183429718017578125} D {0.1224744841456413269042969 -0.06123724207282066345214844 -0.06123724207282066345214844}
put {xycutrcc.s} arb8 V1 {0.4098457992076873779296875 0.330240428447723388671875 -0.03679068386554718017578125} V2 {0.3675903864204883575439453 0.3863152638077735900878906 -0.03679068386160150305741467} V3 {0.3675903864204883575439453 0.3863152638077735900878906 0.03342260420322418212890625} V4 {0.4098457992100617008901509 0.3302404284445723536833839 0.03342260420322418212890625} V5 {0.3537709638476371765136719 0.2879850156605243682861328 -0.03679068386554718017578125} V6 {0.3115155547857284545898438 0.3440598426386713981628418 -0.03679068386160150305741467} V7 {0.3115155547857284545898438 0.3440598426386713981628418 0.03342260420322418212890625} V8 {0.3537709638476371765136719 0.2879850156605243682861328 0.03342260420322418212890625}
put {cutdisks.c} comb region no tree {- {- {- {- {- {l disks.c} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut3.s}} {l cut4.s}}
put {twistcut.s.backu} ell V {0.3945335447788238525390625 0.383843958377838134765625 0.5655720233917236328125} A {0.03095294535160064697265625 -0.0002858481311704963445663452 -0.0002035317302215844392776489} B {0.0002871743054129183292388916 0.03095294535160064697265625 0.0002016565413214266300201416} C {0.0002016565558733418583869934 -0.0002035317156696692109107971 0.03095364384353160858154297}
put {xyzring.r} comb region yes tree {u {l xyzringcut.c} {l xyzringtrc.s}}
attr set {xyzring.r} {color} {230/253/215} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1005} {material_id} {1} {los} {100}
put {viewdir.r} comb region yes tree {l viewdir.c}
attr set {viewdir.r} {color} {253/227/198} {shader} {phong {tr .1 ri 1.5 sh 2}} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
put {xypanel.r} comb region yes tree {l xycut.c}
attr set {xypanel.r} {color} {178/221/243} {shader} {glass {tr 0.6}} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
put {diagram.r} comb region no tree {u {u {u {l arrows.r} {l twistpanel.r}} {u {l twistring.r} {l xypanel.r}}} {u {u {l xyring.r} {l xyzpanel.r}} {u {l xyzring.r} {l viewdir.r}}}}
put {viewdir.c} comb region no tree {u {l viewdirrcc.s} {- {- {- {l viewdirtrc.s} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}}}
put {arrows.r} comb region yes tree {l coordinates.c}
attr set {arrows.r} {color} {217/217/254} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
put {xyring.r} comb region yes tree {u {l xyringcut.c} {l xyringtrc.s}}
attr set {xyring.r} {color} {206/230/242} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1004} {material_id} {1} {los} {100}
put {ground.s} ell V {0 0 -10000.08984375} A {10000 0 0} B {0 6.12303176911188629105709E-13 10000} C {0 -10000 6.12303176911188629105709E-13}
put {xyzcut.c} comb region no tree {- {- {- {- {- {- {- {- {- {- {- {l xyzrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut4.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l viewdirtrc.s}} {l viewdirrcc.s}} {l ringxyztor.s}} {l xyzringtrc.s}}
put {ground.r} comb region yes tree {l ground.c}
attr set {ground.r} {color} {255/255/255} {shader} {stack {{checker {b {192 192 192} s 8192.0}} {phong {sp 0.8 sh 4 em .5}} }} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
put {xyzrcc.s} tgc V {0.005014000460505485534667969 -0.004998999647796154022216797 7.123547086408665851564592E-19} H {-0.009999999776482582092285156 0.009999999776482582092285156 0} A {-0.356000006198883056640625 -0.356000006198883056640625 0} B {0 0 0.5} C {-0.356000006198883056640625 -0.356000006198883056640625 0} D {0 0 0.5}
put {ground.c} comb region no tree {l ground.s}
put {disks2.c} comb region no tree {u {- {- {- {- {l xyzrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l xyrcc.s}} {- {- {- {l xyrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}}}
put {light.s} ell V {-98.451141357421875 103.03456878662109375 200.0417633056640625} A {14 0 0} B {0 14 0} C {0 0 14}
put {light.r} comb region yes tree {l light.s}
attr set {light.r} {color} {255/255/255} {shader} {light {a 270 d {1 0 0} s 16 v 0}} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
put {xyrcc.s} tgc V {0 0 -0.004999999888241291046142578} H {0 0 0.009999999776482582092285156} A {0 -0.5 0} B {0.5 0 0} C {0 -0.5 0} D {0.5 0 0}
put {xycut.c} comb region no tree {- {- {- {- {- {- {- {- {- {- {- {l xyrcc.s} {l cut0.s}} {l cut1.s}} {l cut3.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l xyzrcc.s}} {l ringxytor.s}} {l viewdirtrc.s}} {l xyringtrc.s}} {l viewdirrcc.s}}
put {disks.c} comb region no tree {u {- {l xyzrcc.s} {l xyrcc.s}} {l xyrcc.s}}
put {rings.c} comb region no tree {u {l ringxytor.s} {l ringxyztor.s}}
put {ztec.s} tgc V {0 0 1} H {0 0 0.1000000014901161193847656} A {0.02999999932944774627685547 0 0} B {0 0.02999999932944774627685547 0} C {0.0003000000142492353916168213 0 0} D {0 0.0003000000142492353916168213 0}
put {ytec.s} tgc V {0 1 0} H {0 0.1000000014901161193847656 0} A {0.02999999932944774627685547 0 0} B {0 0 0.02999999932944774627685547} C {0.0003000000142492353916168213 0 0} D {0 0 0.0003000000142492353916168213}
put {xtec.s} tgc V {1 0 0} H {0.1000000014901161193847656 0 0} A {0 0.02999999932944774627685547 0} B {0 0 0.02999999932944774627685547} C {0 0.0003000000142492353916168213 0} D {0 0 0.0003000000142492353916168213}
put {zrcc.s} tgc V {0 0 0} H {0 0 1} A {0 -0.009999999776482582092285156 0} B {0.009999999776482582092285156 0 0} C {0 -0.009999999776482582092285156 0} D {0.009999999776482582092285156 0 0}
put {yrcc.s} tgc V {0 0 0} H {0 1 0} A {0 0 0.009999999776482582092285156} B {0.009999999776482582092285156 0 0} C {0 0 0.009999999776482582092285156} D {0.009999999776482582092285156 0 0}
put {xrcc.s} tgc V {0 0 0} H {1 0 0} A {0 0 -0.009999999776482582092285156} B {0 0.009999999776482582092285156 0} C {0 0 -0.009999999776482582092285156} D {0 0.009999999776482582092285156 0}
put {cut4.s} arb8 V1 {1 1 1} V2 {1 -1 1} V3 {-1 -1 1} V4 {-1 1 1} V5 {-1 -1 -1} V6 {-1 -1 -1} V7 {-1 -1 -1} V8 {-1 -1 -1}
put {cut3.s} arb8 V1 {1.010072231292724609375 1.0000178813934326171875 1.010089874267578125} V2 {1.010072231292724831419605 1.0000178813934326171875 -1.0000002384185791015625} V3 {-1.0000178813934326171875 -1.010072231292724609375 -1.0000002384185791015625} V4 {-1.0000178813934326171875 -1.010072231292724609375 1.01008987426757901317842} V5 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625} V6 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625} V7 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625} V8 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625}
put {cut2.s} arb8 V1 {1 -1 -1.0051000118255615234375} V2 {1 1 -1.0051000118255615234375} V3 {1 1 -0.0051000118255615234375} V4 {1 -1 -0.0051000118255615234375} V5 {-1 -1 -1.0051000118255615234375} V6 {-1 1 -1.0051000118255615234375} V7 {-1 1 -0.0051000118255615234375} V8 {-1 -1 -0.0051000118255615234375}
put {cut1.s} arb8 V1 {0 -1 -1} V2 {0 1 -1} V3 {0 1 1} V4 {0 -1 1} V5 {-1 -1 -1} V6 {-1 1 -1} V7 {-1 1 1} V8 {-1 -1 1}
put {cut0.s} arb8 V1 {1 -1 -1} V2 {1 0 -1} V3 {1 0 1} V4 {1 -1 1} V5 {-1 -1 -1} V6 {-1 0 -1} V7 {-1 0 1} V8 {-1 -1 1}
put {coordinates.c} comb region no tree {u {u {u {u {u {- {- {l xrcc.s} {l yrcc.s}} {l zrcc.s}} {- {- {l yrcc.s} {l xrcc.s}} {l zrcc.s}}} {- {- {l zrcc.s} {l xrcc.s}} {l yrcc.s}}} {l xtec.s}} {l ytec.s}} {l ztec.s}}
put {ringxyztor.s} tor V {0 0 0} H {-0.7071067811865475727373109 0.7071067811865475727373109 0} r_a 0.4999999914428644998132256 r_h 0.009999999670806607177109271
+1 -1
View File
@@ -15,7 +15,7 @@ familiar with the project.
* Render some pictures using rt and rtedge
* Perform basic geometric analysis using rtarea, rtweight, and gqa
* Perform basic geometric analysis using rtarea, rtweight, and g_qa
* Write a procedural geometry tool (see examples in src/proc-db)
+25
View File
@@ -3386,6 +3386,11 @@
<link xlink:href="../../man1/en/g-var.php">G-var</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../man1/en/g-vrml.php">G-vrml</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../man1/en/g-x3d.php">G x3d</link>
@@ -4323,6 +4328,11 @@
<link xlink:href="../../mann/en/d.php">D</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/dall.php">Dall</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/db.php">DB</link>
@@ -4468,6 +4478,11 @@
<link xlink:href="../../mann/en/erase.php">Erase</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/erase_all.php">Erase All</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/ev.php">EV</link>
@@ -4488,6 +4503,11 @@
<link xlink:href="../../mann/en/expand.php">Expand</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/export_body.php">Export Body</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/extrude.php">Extrude</link>
@@ -5213,6 +5233,11 @@
<link xlink:href="../../mann/en/vquery_ray.php">Vquery Ray</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/vrmgr.php">Vrmgr</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../mann/en/vrot.php">vrot</link>
+142 -2
View File
@@ -5162,6 +5162,9 @@ x delete character
<entry>
<link linkend="d">d</link>
</entry>
<entry>
<link linkend="dall">dall</link>
</entry>
<entry>
<link linkend="db">db</link>
</entry>
@@ -5244,6 +5247,9 @@ x delete character
<entry>
<link linkend="erase">erase</link>
</entry>
<entry>
<link linkend="erase_all">erase_all</link>
</entry>
<entry>
<link linkend="ev">ev</link>
</entry>
@@ -5255,6 +5261,9 @@ x delete character
<entry>
<link linkend="expand">expand</link>
</entry>
<entry>
<link linkend="export_body">export_body</link>
</entry>
<entry>
<link linkend="expand_comb">expand_comb</link>
</entry>
@@ -5705,6 +5714,9 @@ x delete character
<entry>
<link linkend="vquery_ray">vquery_ray</link>
</entry>
<entry>
<link linkend="vrmgr">vrmgr</link>
</entry>
<entry>
<link linkend="vrot">vrot</link>
</entry>
@@ -7906,7 +7918,8 @@ x delete character
explicitly displayed objects). Objects that are displayed as
members of explicitly displayed combinations cannot be deleted
from the display with this command (see
<link linkend="erase">erase -r</link>). Note that this
<link linkend="dall">dall</link> or
<link linkend="erase_all">erase_all</link>). Note that this
has no effect on the <emphasis>BRL-CAD</emphasis> database
itself. To actually remove objects from the database, use the
<link linkend="kill">kill</link> command.
@@ -7932,6 +7945,36 @@ x delete character
<para>
<emphasis role="strong"></emphasis>
</para>
<variablelist xml:id="dall">
<varlistentry>
<term>
dall <emphasis>&lt;objects</emphasis>&gt;
</term>
<listitem>
<para>
The <quote>dall</quote> command deletes the specified list of
objects from the <emphasis>mged</emphasis> display. This is a
synonym for the <link linkend="erase_all">erase_all</link>
command. This command will allow the user to delete objects
that have not been explicitly displayed (unlike the
<link linkend="d">d</link> command). Note that this has no
effect on the <emphasis>BRL-CAD</emphasis> database itself. To
actually remove objects from the database, use the
<link linkend="kill">kill</link> command.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Examples:
</term>
<listitem>
<para>
mged&gt; dall region1 shapea
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
– Delete <emphasis>region1</emphasis> and
<emphasis>shapea</emphasis> from the <emphasis>mged</emphasis>
@@ -9258,7 +9301,8 @@ x delete character
explicitly displayed objects). Objects that are displayed as
members of explicitly displayed combinations cannot be deleted
from the display with this command (see
<link linkend="erase">erase -r</link>). Note that this
<link linkend="dall">dall</link> or
<link linkend="erase_all">erase_all</link>). Note that this
has no effect on the <emphasis>BRL-CAD</emphasis> database
itself. To actually remove objects from the database, use the
<link linkend="kill">kill</link> command.
@@ -9283,6 +9327,36 @@ x delete character
<para>
<emphasis role="strong"></emphasis>
</para>
<variablelist xml:id="erase_all">
<varlistentry>
<term>
erase_all <emphasis>&lt;objects</emphasis>&gt;
</term>
<listitem>
<para>
The <quote>erase_all</quote> command deletes the specified
list of objects from the MGED display. This is a synonym for
the <link linkend="dall">dall</link> command. This command
will allow the user to delete objects that have not been
explicitly displayed (unlike the <link linkend="d">d</link> or
<link linkend="erase">erase</link> commands). Note that this
has no effect on the <emphasis>BRL-CAD</emphasis> database
itself. To actually remove objects from the database, use the
<link linkend="kill">kill</link> command.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Examples:
</term>
<listitem>
<para>
mged&gt; erase_all region1 shapea
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
– Delete <emphasis>region1</emphasis> and
<emphasis>shapea</emphasis> from the MGED display.
@@ -9462,6 +9536,28 @@ x delete character
<para>
<emphasis role="strong"></emphasis>
</para>
<para xml:id="export_body">
export_body object file
</para>
<para>
The <quote>export_body</quote> command is used to copy the contents
of the specified binary <emphasis>object</emphasis> into the
specified <emphasis>file</emphasis>. Currently, only binary objects
containing a uniform array of simple objects is supported.
</para>
<para>
Examples:
</para>
<para>
<literal></literal>
</para>
<para>
mged&gt; export_body bin_chars /home/fred/chars
</para>
<para>
– Copy the contents of <quote>bin_chars</quote> into the file
<quote>/home/fred/chars</quote>
</para>
<para xml:id="expand_comb">
expand_comb <emphasis>prefix comb …</emphasis>
</para>
@@ -16639,6 +16735,50 @@ EOF
<para>
<emphasis role="strong"></emphasis>
</para>
<variablelist xml:id="vrmgr">
<varlistentry>
<term>
vrmgr <emphasis>host</emphasis> {<emphasis>master</emphasis> |
<emphasis>slave</emphasis> | <emphasis>overview</emphasis>}
</term>
<listitem>
<para>
The <quote>vrmgr</quote> command establishes a link between
the current MGED display and a <emphasis>vrmgr</emphasis>
process running on the specified <emphasis>host</emphasis>.
The <emphasis>vrmgr</emphasis> program is a manager for
virtual reality displays using MGED. The
<emphasis>vrmgr</emphasis> process must be started on
<emphasis>host</emphasis> prior to executing the
<emphasis>vrmgr</emphasis> command in MGED. The second command
line argument to the <emphasis>vrmgr</emphasis> command is the
role of the current MGED display. The
<emphasis>master</emphasis> display controls the viewing
parameters of itself and all the <emphasis>slave</emphasis>
displays. The <emphasis>overview</emphasis> display acts as an
observer of the entire virtual reality process.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Examples:
</term>
<listitem>
<para>
mged&gt; vrmgr host1.brlcad.org master
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
– Set the current MGED display as the <emphasis>master</emphasis>
for the <emphasis>vrmgr</emphasis> process running on the host named
<emphasis>host1.brlcad.org.</emphasis>
</para>
<para>
<emphasis role="strong"></emphasis>
</para>
<variablelist xml:id="vrot">
<varlistentry>
<term>
@@ -2963,7 +2963,7 @@ comb comb_name u a - b + c
<para>
There are several ways to evaluate BRL-CAD geometry. These include
(1) rendering the image using rt, (2) checking for overlaps using rtcheck
(or the lesser-known/used glint or MGED's overlap tool), and (3) checking
(or the lesser-known/used g_lint or MGED's overlap tool), and (3) checking
for faulty material composition (e.g., densities) using rtweight.
</para>
<para>
@@ -2977,7 +2977,7 @@ comb comb_name u a - b + c
</para>
<para>
As subcomponents are organized into assemblies and the complexity of the
geometry increases, it is then a good practice to use rtcheck (or glint
geometry increases, it is then a good practice to use rtcheck (or g_lint
or the overlap tool) to help find any errors in the geometry and isolate
any problems.
</para>
+3 -10
View File
@@ -5,7 +5,6 @@ set(man1_EN
anim_track.xml
anim_turn.xml
ap-pix.xml
alias-pix.xml
asc-nmg.xml
asc-plot3.xml
asc2dsp.xml
@@ -13,7 +12,6 @@ set(man1_EN
azel.xml
bary.xml
benchmark.xml
brlman.xml
bot_dump.xml
bot_shell-vtk.xml
brep_simple.xml
@@ -89,7 +87,6 @@ set(man1_EN
fbzoom.xml
firpass.xml
g-acad.xml
g-dot.xml
g-dxf.xml
g-egg.xml
g-euclid.xml
@@ -107,16 +104,16 @@ set(man1_EN
g-voxel.xml
g-vrml.xml
g-x3d.xml
g-dot.xml
g2asc.xml
gastank.xml
g_diff.xml
g_lint.xml
gdiff.xml
gencolor.xml
gif-fb.xml
gif2fb.xml
glint.xml
gqa.xml
halftone.xml
handle.xml
hex.xml
icv.xml
iges-g.xml
@@ -135,7 +132,6 @@ set(man1_EN
obj-g.xml
patch-g.xml
pictx.xml
picket_fence.xml
pix-alias.xml
pix-bw.xml
pix-fb.xml
@@ -241,9 +237,6 @@ set(man1_EN
vdeck.xml
viewpoint-g.xml
wavelet.xml
window.xml
window_frame.xml
wire.xml
wdb_example.xml
)
+17
View File
@@ -284,6 +284,23 @@ are, by convention, lower case for file information,
and upper case for screen information.
Here's a list of some of the common options you may encounter:</para>
<variablelist remap='TP'>
<varlistentry>
<term><option>-h</option></term>
<listitem>
<para>The "high resolution" flag, increasing the default screen and file
size of 512x512
to 1024x1024. Has same effect as
<option>-s</option> 1024 (or <option>-S</option> 1024)
but exists as a convenient shorthand held over from the simple days
when framebuffers were square, and only came in two resolutions.
This historical usage unfortunately preempts this letter from use
as a height specifier, forcing that function to relocate under
protest to
<option>-n</option>,
which can be thought of as "number of scanlines", which isn't
too bad a mnemonic.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-i</option></term>
<listitem>
-109
View File
@@ -1,109 +0,0 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="brlman1">
<refmeta>
<refentrytitle>BRLMAN</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>brlman</refname>
<refpurpose>
a manual page viewer for BRL-CAD
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>brlman</command>
<arg choice="opt" rep="repeat"><replaceable>options</replaceable></arg>
<arg choice="opt"><replaceable>manpage</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>
<command>brlman</command> provides manual page viewing capabilities for
BRL-CAD's programs, commands, libraries, and conventions (such as file
formats and attribute standards.) On Unix-type systems, its default
behavior is to wrap the system <command>man</command> command with the appropriate path
information to allow man to find and display BRL-CAD's man pages. On
systems without a <command>man</command> command, <command>brlman</command>
will instead launch a Tcl/Tk based graphical view that displays html
versions of the manual pages. Both versions are generated from the same
DocBook source files and contain the same information.
</para>
</refsection>
<refsection xml:id="brlman_options"><title>OPTIONS</title>
<variablelist remap="TP">
<varlistentry>
<term><emphasis remap="B" role="bold">-h</emphasis></term>
<listitem>
<para>
Prints help.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-g</emphasis></term>
<listitem>
<para>
Instructs <command>brlman</command> to use its graphical man page viewer.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-L</emphasis></term>
<listitem>
<para>
Specify a language to use when selecting man pages.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-S [1 3 5 n]</emphasis></term>
<listitem>
<para>
Specify a particular section to use when searching for a man page. Useful when there are programs and MGED commands with the same names - the default man page returned will be that of the program, so <option>-S</option> can be used to specify the MGED page instead. Allowed sections are 1 (programs), 3 (libraries), 5 (conventions), and n (MGED).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">--no-gui</emphasis></term>
<listitem>
<para>
Instructs <command>brlman</command> <emphasis>not</emphasis> to use its graphical man page viewer, even in situations where there is no command line option. Primarily useful in scripting situations.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title>
<para>Clifford Yapp</para>
</refsection>
<refsection xml:id="copyright"><title>COPYRIGHT</title>
<para>
This software is Copyright (c) 2016 United States Government as
represented by the U.S. Army Rebrlman Laboratory.
</para>
</refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
<!-- vim: set shiftwidth=2 : -->
+1 -1
View File
@@ -97,7 +97,7 @@ to avoid having to create a font converter.</para>
</refsection>
<refsection xml:id="example"><title>EXAMPLE</title>
<para>fblabel -f "oldenglish.14" `fbpoint -H` "Hello"</para>
<para>fblabel -f "oldenglish.14" `fbpoint -h` "Hello"</para>
</refsection>
<refsection xml:id="see_also"><title>SEE ALSO</title>
+91
View File
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- lifted from troff+man by doclifter -->
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='g_diff1'>
<refmeta>
<refentrytitle>G_DIFF
</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
</refmeta>
<refnamediv>
<refname>g_diff</refname>
<refpurpose>a BRL-CAD differential geometry comparator</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id='synopsis'>
<cmdsynopsis>
<command>g_diff</command><arg choice='opt'>-m </arg>
<arg choice='opt'>-f </arg>
<arg choice='opt'>-v </arg>
<arg choice='plain'><replaceable>model1.g</replaceable></arg>
<arg choice='plain'><replaceable>model2.g</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 xml:id='description'><title>DESCRIPTION</title>
<para><command>g_diff</command>
compares the two BRL-CAD models specified on the command line. The results of this comparison
are written to standard out in a human readable form describing the changes from model1 to model2.
If the
<option>-m</option>
option is exercised, the output will be a script, readable by <command>mged(1)</command>, that will perform the
necessary changes to model1 to make it a copy of model2. The produced script makes extensive use
of the
<emphasis remap='I'>db get</emphasis>,
<emphasis remap='I'>db put</emphasis>,
and
<emphasis remap='I'>db adjust</emphasis>
commands in <command>mged(1)</command>. A few solid types are not supported by these commands, and changes involving these
solids are merely noted (the script will not actually be capable of performing all the changes in this case).
The
<option>-e</option>
option selections evolutionary mode, which attempts to guess if a change in a region is due to an evolutionary change or a reworking.
The output is similar to -m, but it is NOT mged readable.
The
<option>-f</option>
option requests that all floating point numerical comparisons be done in single precision rather
than the default double precision. This may be useful when comparing different format databases.
The
<option>-v</option>
option requests that the default attributes of each region in both files be checked for
consistency. Any inconsistencies are written to stderr.</para>
<para>The program returns 0 if the files being compared have no differences and non-zero otherwise.</para>
</refsect1>
<refsect1 xml:id='example'><title>EXAMPLE</title>
<para>The command</para>
<!-- .in +5 -->
<para>g_diff -m uncle.g aunt.g &gt; mged.script</para>
<!-- .in &bsol;-5 -->
<para>will create a file named "mged.script" that may be sourced in <command>mged(1)</command> to change
uncle.g into aunt.g .</para>
</refsect1>
<refsect1 xml:id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>
</refsect1>
<refsect1 xml:id='author'><title>AUTHOR</title>
<para>BRL-CAD Team</para>
</refsect1>
<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
<para>This software is Copyright (c) 1999-2016 by the United States
Government as represented by U.S. Army Research Laboratory.</para>
</refsect1>
<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
<para>Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;.</para>
</refsect1>
</refentry>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- lifted from troff+man by doclifter -->
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='glint1'>
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='g_lint1'>
<refmeta>
<refentrytitle>G_LINT
</refentrytitle>
@@ -10,13 +10,13 @@
</refmeta>
<refnamediv>
<refname>glint</refname>
<refname>g_lint</refname>
<refpurpose>a BRL-CAD geometry checker</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id='synopsis'>
<cmdsynopsis>
<command>glint</command> <arg choice='opt'><replaceable>options</replaceable></arg>
<command>g_lint</command> <arg choice='opt'><replaceable>options</replaceable></arg>
<arg choice='plain'><replaceable>model.g</replaceable></arg>
<arg choice='plain' rep='repeat'><replaceable>objects</replaceable></arg>
@@ -25,7 +25,7 @@
<refsect1 xml:id='description'><title>DESCRIPTION</title>
<para><command>glint</command>
<para><command>g_lint</command>
uses
<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry>
to fire an array of parallel rays
@@ -144,7 +144,7 @@ The default is 0.</para>
<listitem>
<para>Specifies that one ray should be fired from the center of each grid cell.
By default,
<command>glint</command>
<command>g_lint</command>
fires a ray from one random point in each cell.</para>
</listitem>
</varlistentry>
@@ -170,7 +170,7 @@ The default is 100 mm.</para>
<term><option>-o</option></term>
<listitem>
<para>Causes
<command>glint</command>
<command>g_lint</command>
to include in each report
the model coordinates of the ray origination point.
These appear between the tag and the rest of the data.</para>
@@ -180,7 +180,7 @@ These appear between the tag and the rest of the data.</para>
<term><option>-p</option></term>
<listitem>
<para>Causes
<command>glint</command>
<command>g_lint</command>
to produce its reports as
<emphasis remap='I'>plot3(5)</emphasis>
drawing commands instead of ASCII text.
@@ -238,14 +238,14 @@ The default is 1.</para>
<term><option>-s</option></term>
<listitem>
<para>Causes
<command>glint</command>
<command>g_lint</command>
to collect all the overlap reports and sort them before printing them.
The reports for a given pair of regions
are printed contiguously,
and the clusters of reports for the various pairs of regions
appear in order of decreasing cumulative overlap length.
By default,
<command>glint</command>
<command>g_lint</command>
reports overlaps immediately and in the order of their discovery.</para>
</listitem>
</varlistentry>
@@ -281,7 +281,7 @@ ignores air regions.</para>
<term><option>-x</option><replaceable> bits</replaceable></term>
<listitem>
<para>Sets the
<command>glint</command>
<command>g_lint</command>
debug flags to
<emphasis remap='I'>bits</emphasis>.
See the
@@ -299,7 +299,7 @@ Note that some of the report types have no corresponding diagnostics.</para>
<para>The command</para>
<!-- .in +5 -->
<para>glint -a 35 -e 25 -c -g 1 -r 31 -t 0.01 <emphasis remap='I'>kitchen.g appliances</emphasis></para>
<para>g_lint -a 35 -e 25 -c -g 1 -r 31 -t 0.01 <emphasis remap='I'>kitchen.g appliances</emphasis></para>
<!-- .in &bsol;-5 -->
<para>fires a ray every millimeter and produces overlap reports
+324 -324
View File
@@ -1,100 +1,100 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='gdiff1'>
<refmeta>
<refentrytitle>GDIFF
</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
</refmeta>
<refmeta>
<refentrytitle>GDIFF
</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gdiff</refname>
<refpurpose>a BRL-CAD differential geometry comparator</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id='synopsis'>
<cmdsynopsis>
<command>gdiff</command>
<arg choice="opt" rep="repeat"><replaceable>options</replaceable></arg>
<arg choice='plain'><replaceable>left_model.g</replaceable></arg>
<arg choice='opt'><replaceable>ancestor_model.g</replaceable></arg>
<arg choice='plain'><replaceable>right_model.g</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refnamediv>
<refname>gdiff</refname>
<refpurpose>a BRL-CAD differential geometry comparator</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id='synopsis'>
<cmdsynopsis>
<command>gdiff</command>
<arg choice="opt" rep="repeat"><replaceable>options</replaceable></arg>
<arg choice='plain'><replaceable>left_model.g</replaceable></arg>
<arg choice='opt'><replaceable>ancestor_model.g</replaceable></arg>
<arg choice='plain'><replaceable>right_model.g</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 xml:id='description'><title>DESCRIPTION</title>
<para>
<command>gdiff</command> compares BRL-CAD models
specified on the command line, reporting differences according to the
specified options. It supports a plain "diff" comparison between two
files, as well as a "3-way" comparison that accepts a third file with
"ancestral" information that provides a context for the left and right
files.
</para>
<para>The following options are recognized:</para>
<variablelist remap="TP">
<varlistentry>
<term><option>-a</option></term>
<listitem>
<para>(two-way diff) Report objects added in right_model.g</para>
<para>(three-way diff) Report objects added in left_model.g and/or right_model.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option></term>
<listitem>
<para>(two-way diff) Report objects deleted in right_model.g</para>
<para>(three-way diff) Report objects deleted in left_model.g and/or right_model.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option></term>
<listitem>
<para>(two-way diff) Report objects modified in right_model.g</para>
<para>(three-way diff) Report objects that are different in left_model.g and/or right_model.g relative to ancestor.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-u</option></term>
<listitem>
<para>(two-way diff) Report objects that are identical in left_model.g and right_model.g</para>
<para>(three-way diff) Report objects that are identical in ancestor_model.g, left_model.g and right_model.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v #</option></term>
<listitem><para>Control the verbosity of the output. Zero will suppress all reporting and only the return value of the program will contain information, one will provide categorized lists of objects but no details on what changed, two will list each changed object preceded by a modifier, three will print more details for changed objects, and four will print all available information. All settings for this option will respect other constraints applied to the reporting output.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-t #</option></term>
<listitem><para>Set a numerical comparison tolerance used to compare numerical properties. Default value is RT_LEN_TOL, but be aware that this comparison is not aware of units.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-F "filter_string"</option></term>
<listitem><para>Apply filters to the diff output, using the same set of filters available in the <command>search</command> command's search. See the <command>search</command> manual page for more details.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-M merged_file.g</option></term>
<listitem><para>Merge the files being diffed into one output file.</para></listitem>
</varlistentry>
</variablelist>
<refsect1 xml:id='description'><title>DESCRIPTION</title>
<para>
<command>gdiff</command> compares BRL-CAD models
specified on the command line, reporting differences according to the
specified options. It supports a plain "diff" comparison between two
files, as well as a "3-way" comparison that accepts a third file with
"ancestral" information that provides a context for the left and right
files.
</para>
<para>The following options are recognized:</para>
<variablelist remap="TP">
<varlistentry>
<term><option>-a</option></term>
<listitem>
<para>(two-way diff) Report objects added in right_model.g</para>
<para>(three-way diff) Report objects added in left_model.g and/or right_model.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option></term>
<listitem>
<para>(two-way diff) Report objects deleted in right_model.g</para>
<para>(three-way diff) Report objects deleted in left_model.g and/or right_model.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option></term>
<listitem>
<para>(two-way diff) Report objects modified in right_model.g</para>
<para>(three-way diff) Report objects that are different in left_model.g and/or right_model.g relative to ancestor.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-u</option></term>
<listitem>
<para>(two-way diff) Report objects that are identical in left_model.g and right_model.g</para>
<para>(three-way diff) Report objects that are identical in ancestor_model.g, left_model.g and right_model.g</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v #</option></term>
<listitem><para>Control the verbosity of the output. Zero will suppress all reporting and only the return value of the program will contain information, one will provide categorized lists of objects but no details on what changed, two will list each changed object preceded by a modifier, three will print more details for changed objects, and four will print all available information. All settings for this option will respect other constraints applied to the reporting output.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-t #</option></term>
<listitem><para>Set the length tolerance used to compare numerical properties. Units are millimeters. Default value is RT_LEN_TOL.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-F "filter_string"</option></term>
<listitem><para>Apply filters to the diff output, using the same set of filters available in the <command>search</command> command's search. See the <command>search</command> manual page for more details.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-M merged_file.g</option></term>
<listitem><para>Merge the files being diffed into one output file.</para></listitem>
</varlistentry>
</variablelist>
<para>
The program returns 0 if the files being compared have no differences that satisfy
the user-supplied options, otherwise it returns the total number of differing objects that do
satisfy the supplied options. Default is to report all differences that rise above RT_LEN_TOL.
</para>
</refsect1>
<para>
The program returns 0 if the files being compared have no differences that satisfy
the user-supplied options, otherwise it returns the total number of differing objects that do
satisfy the supplied options. Default is to report all differences that rise above RT_LEN_TOL.
</para>
</refsect1>
<refsect1 xml:id='example'><title>EXAMPLES</title>
<refsect1 xml:id='example'><title>EXAMPLES</title>
<example><title>Default Diffing Results</title>
<para>
Running the default options on two pre-prepared examples of Moss World gives us a summary of the status of various objects:
<literallayout>
<computeroutput>
<para>
Running the default options on two pre-prepared examples of Moss World gives us a summary of the status of various objects:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff moss.g moss2.g</userinput>
M platform.r
M ellipse.s
@@ -107,29 +107,29 @@ M tor.r
D LIGHT
A tgc_new.s
A eto.s
</computeroutput>
</literallayout>
'M' denotes an object that was modified, 'D' is an object that was deleted, and 'A' is an object that was added.
</para>
</example>
</computeroutput>
</literallayout>
'M' denotes an object that was modified, 'D' is an object that was deleted, and 'A' is an object that was added.
</para>
</example>
<example><title>Alternate Diffing Result Outputs</title>
<para>
The <option>v</option> provides various styles of output, as follows:
</para>
<para>
<option>-v 0</option> (no output except the return code):
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 0 moss.g moss2.g</userinput>
</computeroutput>
</literallayout>
</para>
<example><title>Alternate Diffing Result Outputs</title>
<para>
The <option>v</option> provides various styles of output, as follows:
</para>
<para>
<option>-v 0</option> (no output except the return code):
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 0 moss.g moss2.g</userinput>
</computeroutput>
</literallayout>
</para>
<para>
<option>-v 1</option>:
<literallayout>
<computeroutput>
<para>
<option>-v 1</option>:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 1 moss.g moss2.g</userinput>
Added:
tgc_new.s, eto.s
@@ -139,15 +139,15 @@ LIGHT
Changed:
platform.r, ellipse.s, light.r, _GLOBAL, cone.s, cone.r, box.s, tor.r
</computeroutput>
</literallayout>
Objects are reported in lists, categorized by their status.
</para>
</computeroutput>
</literallayout>
Objects are reported in lists, categorized by their status.
</para>
<para>
<option>-v 2</option> (default):
<literallayout>
<computeroutput>
<para>
<option>-v 2</option> (default):
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 2 moss.g moss2.g</userinput>
M platform.r
M ellipse.s
@@ -160,15 +160,15 @@ M tor.r
D LIGHT
A tgc_new.s
A eto.s
</computeroutput>
</literallayout>
If verbosity is not specified, this is the default output.
</para>
</computeroutput>
</literallayout>
If verbosity is not specified, this is the default output.
</para>
<para>
<option>-v 3</option>:
<literallayout>
<computeroutput>
<para>
<option>-v 3</option>:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 3 moss.g moss2.g</userinput>
- "platform.r" tree(p): l platform.s
+ "platform.r" tree(p): - {l platform.s} {l cone.s}
@@ -199,17 +199,17 @@ A eto.s
D LIGHT
A tgc_new.s
A eto.s
</computeroutput>
</literallayout>
Verbosity 3 is a more detailed version of the previous setting, with each parameter in the modified objects reported in detail. '-' lines
show what was removed for a given attribute or parameter, and '+' lines contain the data that replaced them.
</para>
</computeroutput>
</literallayout>
Verbosity 3 is a more detailed version of the previous setting, with each parameter in the modified objects reported in detail. '-' lines
show what was removed for a given attribute or parameter, and '+' lines contain the data that replaced them.
</para>
<para>
<option>-v 4</option>:
<literallayout>
<computeroutput>
<para>
<option>-v 4</option>:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 4 moss.g moss2.g</userinput>
- "platform.r" tree(p): l platform.s
+ "platform.r" tree(p): - {l platform.s} {l cone.s}
@@ -255,70 +255,70 @@ A "eto.s" C(p): 3.448298656000062134552309 0 3.448298656000062134552309
A "eto.s" N(p): 0 0 0.01724149328000028000285049
A "eto.s" V(p): 8.533195938359670051909234 -11.04524849332910996224655 -1.403988582132086548881489
A "eto.s" DB5_MINORTYPE(p): eto
</computeroutput>
</literallayout>
Verbosity 4 is a fully detailed diff that contains all information added or removed.
</para>
</computeroutput>
</literallayout>
Verbosity 4 is a fully detailed diff that contains all information added or removed.
</para>
</example>
</example>
<example><title>Filtering Based on Difference Type</title>
<para>
The options <option>a</option>, <option>d</option>, <option>m</option>, and <option>u</option> control
which categories of diff results (added, deleted, modified, and unchanged) are reported. By default
added, deleted and modified items are reported, but once one of these four options is specified only
those specified are reported:
</para>
<para>
Report only objects added:
<literallayout>
<computeroutput>
<example><title>Filtering Based on Difference Type</title>
<para>
The options <option>a</option>, <option>d</option>, <option>m</option>, and <option>u</option> control
which categories of diff results (added, deleted, modified, and unchanged) are reported. By default
added, deleted and modified items are reported, but once one of these four options is specified only
those specified are reported:
</para>
<para>
Report only objects added:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -a moss.g moss2.g</userinput>
A tgc_new.s
A eto.s
</computeroutput>
</literallayout>
</para>
<para>
Report only objects deleted:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
</para>
<para>
Report only objects deleted:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -d moss.g moss2.g</userinput>
D LIGHT
</computeroutput>
</literallayout>
</para>
<para>
Report both added and deleted objects, but not modified objects:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
</para>
<para>
Report both added and deleted objects, but not modified objects:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -a -d moss.g moss2.g</userinput>
D LIGHT
A tgc_new.s
A eto.s
</computeroutput>
</literallayout>
</para>
<para>
Report unmodified objects:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
</para>
<para>
Report unmodified objects:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -u moss.g moss2.g</userinput>
ellipse.r
box.r
all.g
</computeroutput>
</literallayout>
</para>
</example>
ellipse.r
box.r
all.g
</computeroutput>
</literallayout>
</para>
</example>
<example><title>Filtering Results With Tolerance</title>
<para>
To eliminate differences in modifications that are too small to be of interest, the <option>t</option> is used. What
difference constitutes "too small" is up to the user - in this example, we will use 30 millimeters:
<literallayout>
<computeroutput>
<example><title>Filtering Results With Tolerance</title>
<para>
To eliminate differences in modifications that are too small to be of interest, the <option>t</option> is used. What
difference constitutes "too small" is up to the user - in this example, we will use 30 millimeters:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 3 -t 30.0 moss.g moss2.g</userinput>
- "platform.r" tree(p): l platform.s
+ "platform.r" tree(p): - {l platform.s} {l cone.s}
@@ -335,30 +335,30 @@ all.g
D LIGHT
A tgc_new.s
A eto.s
</computeroutput>
</literallayout>
Notice that ellipse.s, which was on earlier lists, is now filtered out. cone.s has a difference in the x coordinates
of the parameter V that is large enough to satisfy the tolerance filter, so that parameter stays in. Parameters that
are not strictly numerical comparisons, or those that are part of added or deleted objects, remain in the report.
</para>
</example>
</computeroutput>
</literallayout>
Notice that ellipse.s, which was on earlier lists, is now filtered out. cone.s has a difference in the x coordinates
of the parameter V that is large enough to satisfy the tolerance filter, so that parameter stays in. Parameters that
are not strictly numerical comparisons, or those that are part of added or deleted objects, remain in the report.
</para>
</example>
<example><title>Filtering Results With Search Filters</title>
<para>
The <emphasis>search</emphasis> filtering technique can be used to select specific subsets of the database to see
in reports, using the <option>F</option> option. For example, limiting the diff report to only objects of type elliptical torus:
<literallayout>
<computeroutput>
<example><title>Filtering Results With Search Filters</title>
<para>
The <emphasis>search</emphasis> filtering technique can be used to select specific subsets of the database to see
in reports, using the <option>F</option> option. For example, limiting the diff report to only objects of type elliptical torus:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -F "-type eto" moss.g moss2.g</userinput>
A eto.s
</computeroutput>
</literallayout>
</para>
<para>
Note that this option will work at all levels of verbosity:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
</para>
<para>
Note that this option will work at all levels of verbosity:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 4 -F "-type eto" moss.g moss2.g</userinput>
A "eto.s" r_d(p): 1.724149328000026404339451
A "eto.s" r(p): 13.79319462400021123471561
@@ -366,17 +366,17 @@ A "eto.s" C(p): 3.448298656000062134552309 0 3.448298656000062134552309
A "eto.s" N(p): 0 0 0.01724149328000028000285049
A "eto.s" V(p): 8.533195938359670051909234 -11.04524849332910996224655 -1.403988582132086548881489
A "eto.s" DB5_MINORTYPE(p): eto
</computeroutput>
</literallayout>
</para>
</example>
</computeroutput>
</literallayout>
</para>
</example>
<example><title>Combining Multiple Filters</title>
<para>
The various diff filters can be used together. For example, repeating the search
filter with ell types added to the accepted list produces the following:
<literallayout>
<computeroutput>
<example><title>Combining Multiple Filters</title>
<para>
The various diff filters can be used together. For example, repeating the search
filter with ell types added to the accepted list produces the following:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 4 -F "-type eto -or -type ell" moss.g moss2.g</userinput>
- "ellipse.s" C(p): 0 8.980256080627000869753829 8.980256080627000869753829
+ "ellipse.s" C(p): 0 1.561016355403846755933728 1.561016355403846755933728
@@ -393,13 +393,13 @@ A "eto.s" C(p): 3.448298656000062134552309 0 3.448298656000062134552309
A "eto.s" N(p): 0 0 0.01724149328000028000285049
A "eto.s" V(p): 8.533195938359670051909234 -11.04524849332910996224655 -1.403988582132086548881489
A "eto.s" DB5_MINORTYPE(p): eto
</computeroutput>
</literallayout>
</para>
<para>
If we now add the tolerance filter, we see ellipse.s is filtered out:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
</para>
<para>
If we now add the tolerance filter, we see ellipse.s is filtered out:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 4 -t 30.0 -F "-type eto -or -type ell" moss.g moss2.g</userinput>
D "LIGHT" C(p): 0 0 2.539999961852999810218989
D "LIGHT" B(p): 0 2.539999961852999810218989 0
@@ -412,23 +412,23 @@ A "eto.s" C(p): 3.448298656000062134552309 0 3.448298656000062134552309
A "eto.s" N(p): 0 0 0.01724149328000028000285049
A "eto.s" V(p): 8.533195938359670051909234 -11.04524849332910996224655 -1.403988582132086548881489
A "eto.s" DB5_MINORTYPE(p): eto
</computeroutput>
</literallayout>
ellipse.s satisfies the search filter, but is filtered by virtue of having no differences larger than 30 in its parameters.
</para>
</computeroutput>
</literallayout>
ellipse.s satisfies the search filter, but is filtered by virtue of having no differences larger than 30 in its parameters.
</para>
</example>
</example>
<example><title>Three Way Differences</title>
<para>
A "3-way" diff uses an ancestor file as a basis for evaluating the differences between two
other files. This ancestor provides a "context" in which it is possible to tell whether a
difference between two files is a) the product of a change in one but not the other in
comparison to the original or b) whether both have (incompatibly) changed in comparison
to the original. For example, if we compare moss2.g from the previous examples to a new
file moss3.g:
<literallayout>
<computeroutput>
<example><title>Three Way Differences</title>
<para>
A "3-way" diff uses an ancestor file as a basis for evaluating the differences between two
other files. This ancestor provides a "context" in which it is possible to tell whether a
difference between two files is a) the product of a change in one but not the other in
comparison to the original or b) whether both have (incompatibly) changed in comparison
to the original. For example, if we compare moss2.g from the previous examples to a new
file moss3.g:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff moss2.g moss3.g</userinput>
M platform.r
M ellipse.s
@@ -444,12 +444,12 @@ M all.g
M tor
A ellipse2.r
A LIGHT
</computeroutput>
</literallayout>
All we can tell is that these objects differ from each other. If, however, we add moss.g
to the comparison as an ancestor file:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
All we can tell is that these objects differ from each other. If, however, we add moss.g
to the comparison as an ancestor file:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff moss2.g moss.g moss3.g</userinput>
M platform.r
M ellipse.s
@@ -466,17 +466,17 @@ M tor
A(B) tgc_new.s
C eto.s
A(R) ellipse2.r
</computeroutput>
</literallayout>
We can now see that ellipse.r was deleted only from the right file (moss3.g) and was unchanged in moss2.g.
Similarly, we can tell that LIGHT wsa deleted from moss2.g, ellipse2.r was added in moss3.g, tgc_new.s was
added identically in both moss2.g and moss3.g, and eto.s is different in moss2.g and moss3.g in some fashion
that the ancestor file moss.g cannot help gdiff resolve (a conflict, denoted by 'C'.)
</para>
<para>
To delve deeper into the nature of the changes, we increase the verbosity with the <option>v</option> option:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
We can now see that ellipse.r was deleted only from the right file (moss3.g) and was unchanged in moss2.g.
Similarly, we can tell that LIGHT wsa deleted from moss2.g, ellipse2.r was added in moss3.g, tgc_new.s was
added identically in both moss2.g and moss3.g, and eto.s is different in moss2.g and moss3.g in some fashion
that the ancestor file moss.g cannot help gdiff resolve (a conflict, denoted by 'C'.)
</para>
<para>
To delve deeper into the nature of the changes, we increase the verbosity with the <option>v</option> option:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v 3 moss2.g moss.g moss3.g</userinput>
M(L) "platform.r" tree(p): - {l platform.s} {l cone.s}
M(L) "ellipse.s" C(p): 0 1.561016355403846755933728 1.561016355403846755933728
@@ -502,64 +502,64 @@ M(R) "tor" r_a(p): 30.18139425891995841766402
A(B) tgc_new.s
C(LA!=RA) eto.s
A(R) ellipse2.r
</computeroutput>
</literallayout>
At this level of verbosity, we can now see that most of the modifications are from the left (moss2.g) file. M(L) denotes
a change that is present only in the left file - the right (moss3.g) agrees with the ancestor. Similarly, we can now see
that the deletion of ellipse.r, the addition of ellipse2.r and the change to all.g come from moss3.g. The conflict
on eto.s is that two add operations (one in moss2.g, one in moss3.g) produced different eto.s primitives - there is no
ancestor for eto.s in moss.g, so there is no way to identify one of the eto.s primitives as "correct" - they have equal
standing, and manual intervention is needed to determine which eto.s is the "correct" version.
</para>
</example>
</computeroutput>
</literallayout>
At this level of verbosity, we can now see that most of the modifications are from the left (moss2.g) file. M(L) denotes
a change that is present only in the left file - the right (moss3.g) agrees with the ancestor. Similarly, we can now see
that the deletion of ellipse.r, the addition of ellipse2.r and the change to all.g come from moss3.g. The conflict
on eto.s is that two add operations (one in moss2.g, one in moss3.g) produced different eto.s primitives - there is no
ancestor for eto.s in moss.g, so there is no way to identify one of the eto.s primitives as "correct" - they have equal
standing, and manual intervention is needed to determine which eto.s is the "correct" version.
</para>
</example>
<example><title>Complex Three Way Differences</title>
<para>
Conflicts can arise from situations other than incompatible additions - an incompatible modification
is also enough to trigger a conflict. Consider three ellipsoids, one of which is an ancestor, one of
which has had its A and B vectors modified, and the other of which has had its B and C vectors modified.
A three-way diff of these files reports a conflict:
<literallayout>
<computeroutput>
<example><title>Complex Three Way Differences</title>
<para>
Conflicts can arise from situations other than incompatible additions - an incompatible modification
is also enough to trigger a conflict. Consider three ellipsoids, one of which is an ancestor, one of
which has had its A and B vectors modified, and the other of which has had its B and C vectors modified.
A three-way diff of these files reports a conflict:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff ell_1.g ell_0.g ell_2.g</userinput>
C ell.s
</computeroutput>
</literallayout>
</computeroutput>
</literallayout>
However, closer inspection reveals that this conflict is different than the one reported above for the eto.s object:
<literallayout>
<computeroutput>
However, closer inspection reveals that this conflict is different than the one reported above for the eto.s object:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v3 ell_1.g ell_0.g ell_2.g</userinput>
C(LM!=RM) ell.s
</computeroutput>
</literallayout>
This notation indicates that a modification in the left side (ell_1.g) does not match a modification made in ell_2.g.
Unlike the eto.s, which reported an add conflict, this is a modification conflict triggered by incompatible, different
parameters. Indeed a full verbosity inspection:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
This notation indicates that a modification in the left side (ell_1.g) does not match a modification made in ell_2.g.
Unlike the eto.s, which reported an add conflict, this is a modification conflict triggered by incompatible, different
parameters. Indeed a full verbosity inspection:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -v4 ell_1.g ell_0.g ell_2.g</userinput>
M(R) "ell.s" C(p): 0 0 300
C(A) "ell.s" B(p): 0 500 0
C(L) "ell.s" B(p): 0 510 0
C(R) "ell.s" B(p): 0 300 0
M(L) "ell.s" A(p): 1100 0 0
</computeroutput>
</literallayout>
reveals that the changes to the A and C parameters are <emphasis>not</emphasis> in conflict - it is the B parameter that
is causing the problem.
</para>
</example>
</computeroutput>
</literallayout>
reveals that the changes to the A and C parameters are <emphasis>not</emphasis> in conflict - it is the B parameter that
is causing the problem.
</para>
</example>
<example><title>Merging Files</title>
<para>
The last and most powerful feature of <command>gdiff</command> is to <emphasis>merge</emphasis> two or three different
geometry files into a single output file. This is most useful when an ancestor is available and a three way merge can
be performed - in the two way case, the "ancestor" is an empty file and the results will tend to include many more
conflicts. For example, the three way merge of the moss examples earlier:
<literallayout>
<computeroutput>
<example><title>Merging Files</title>
<para>
The last and most powerful feature of <command>gdiff</command> is to <emphasis>merge</emphasis> two or three different
geometry files into a single output file. This is most useful when an ancestor is available and a three way merge can
be performed - in the two way case, the "ancestor" is an empty file and the results will tend to include many more
conflicts. For example, the three way merge of the moss examples earlier:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -M moss_merged.g moss2.g moss0.g moss3.g</userinput>
M platform.r
M ellipse.s
@@ -583,12 +583,12 @@ CONFLICT(eto.s).right cone.s platform.s
all.g/ ellipse.s tgc_new.s
box.r/R ellipse2.r/R tor
box.s light.r/R tor.r/R
</computeroutput>
</literallayout>
The resulting file has only two conflict objects present - the same eto.s issue that was discussed earlier. Trying to
do the same merge <emphasis>without</emphasis> the ancestor file:
<literallayout>
<computeroutput>
</computeroutput>
</literallayout>
The resulting file has only two conflict objects present - the same eto.s issue that was discussed earlier. Trying to
do the same merge <emphasis>without</emphasis> the ancestor file:
<literallayout>
<computeroutput>
<prompt>~:</prompt><userinput> gdiff -M moss_2way_merge.g moss2.g moss3.g</userinput>
M platform.r
M ellipse.s
@@ -619,36 +619,36 @@ CONFLICT(ellipse.s).right ellipse.r/R
CONFLICT(eto.s).left ellipse2.r/R
CONFLICT(eto.s).right platform.s
CONFLICT(light.r).left/R tgc_new.s
</computeroutput>
</literallayout>
The result is far less clean, although the merge was still performed - in this latter case, the end user will have to
resolve many more conflicting object states manually.
</para>
</example>
</computeroutput>
</literallayout>
The result is far less clean, although the merge was still performed - in this latter case, the end user will have to
resolve many more conflicting object states manually.
</para>
</example>
</refsect1>
</refsect1>
<refsect1 xml:id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>search</refentrytitle><manvolnum>n</manvolnum></citerefentry></para>
<refsect1 xml:id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>search</refentrytitle><manvolnum>n</manvolnum></citerefentry></para>
</refsect1>
</refsect1>
<refsect1 xml:id='author'><title>AUTHOR</title>
<para>BRL-CAD Team</para>
<refsect1 xml:id='author'><title>AUTHOR</title>
<para>BRL-CAD Team</para>
</refsect1>
</refsect1>
<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
<para>This software is Copyright (c) 2014-2016 by the United States
Government as represented by U.S. Army Research Laboratory.</para>
<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
<para>This software is Copyright (c) 2014-2016 by the United States
Government as represented by U.S. Army Research Laboratory.</para>
</refsect1>
</refsect1>
<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
<para>Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;.</para>
</refsect1>
<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
<para>Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;.</para>
</refsect1>
</refentry>
+2 -1
View File
@@ -290,6 +290,7 @@
The
<citerefentry><refentrytitle>pix-fb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
utility can be used later to display ".pix" files.
Note that using -o disables parallel processing.
</para>
</listitem>
</varlistentry>
@@ -393,7 +394,7 @@
<term><option>-C #/#/#</option></term>
<listitem>
<para>sets the background color to the RGB value #/#/#, where each #
is in the range of 0 to 255 or 0.0 to 1.0.
is in the range of 0 to 255.
All non-background colors will be dithered away from this value.</para>
</listitem>
</varlistentry>
+14 -15
View File
@@ -61,7 +61,7 @@
<term><option>-. #</option></term>
<listitem>
<para>
selects the factor used in NUgrid algorithm. Default is 1.5 .
selects the factor used in NUgrid algorithm. Default is 1.5 .
</para>
</listitem>
</varlistentry>
@@ -70,7 +70,7 @@
<term><option>-, #</option></term>
<listitem>
<para>
selects which space partitioning algorithm to use
selects which space partitioning algorithm to use
</para>
</listitem>
</varlistentry>
@@ -106,7 +106,7 @@
<term><option>-d #</option></term>
<listitem>
<para>sets flag for reporting of pixel distances: 1 for on, 0 (default) for off.
(Each pixel is represented by 3 bytes of color information followed by 8 bytes
(Each pixel is represented by 3 bytes of color information followed by 8 bytes
for a double, in IEEE format, which gives the distance to the ray's first hit.
If the ray doesn't hit, a zero distance is reported by default
which causes <citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
@@ -379,7 +379,7 @@
<term><option>-C #/#/#</option></term>
<listitem>
<para>sets the background color to the RGB value #/#/#, where each #
is in the range of 0 to 255 or 0.0 to 1.0.
is in the range of 0 to 255.
All non-background colors will be dithered away from this value.</para>
</listitem>
</varlistentry>
@@ -388,7 +388,7 @@
<term><option>-D #</option></term>
<listitem>
<para>This is the "desired frame" flag, specifying the frame number to start with.
Used with animation scripts; specify the desired ending (kill-after) frame with
Used with animation scripts; specify the desired ending (kill-after) frame with
<option>-K #</option> .</para>
</listitem>
</varlistentry>
@@ -397,7 +397,7 @@
<term><option>-E #</option></term>
<listitem>
<para>sets the distance from the eye point to the center of the model RPP; default is
the square root of 2.
the square root of 2.
Only useful with auto-sizing, and conflicts with
<option>-M</option> .</para>
</listitem>
@@ -425,10 +425,10 @@
<varlistentry>
<term><option>-H #</option></term>
<listitem>
<para>This is the "hypersample" flag, specifying number of extra rays to fire for each pixel to
obtain more accurate results without needing to store the extra pixels. Automatically invokes
<para>This is the "hypersample" flag, specifying number of extra rays to fire for each pixel to
obtain more accurate results without needing to store the extra pixels. Automatically invokes
<option>-J 1</option>. The final colors of all rays are averaged together. Better results can be
obtained by simply increasing the resolution, and decimating the results with a filter such as
obtained by simply increasing the resolution, and decimating the results with a filter such as
<citerefentry><refentrytitle>pixhalve</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
</listitem>
</varlistentry>
@@ -621,7 +621,7 @@
<term><option>-+ #</option></term>
<listitem>
<para>specifies (setting argument to "t") that output is NOT binary (default is that it is).
<option>-+</option> is otherwise not implemented.
<option>-+</option> is otherwise not implemented.
</para>
</listitem>
</varlistentry>
@@ -672,8 +672,8 @@
<listitem>
<para>
set the color of the foreground (edges) to the
given r,g,b triple, where each of r,g,b, is in the range 0 to 255 or 0.0 to 1.0.
The default is white (255/255/255).
given r,g,b triple. The default is white
(255,255,255).
</para>
</listitem>
</varlistentry>
@@ -688,8 +688,7 @@
<listitem>
<para>
set the color of the background to the r,g,b
triple, where each of r,g,b is in the range 0 to 255 or 0.0 to 1.0.
The default is near-black (0,0,1).
triple. The default is near-black (0,0,1).
</para>
</listitem>
</varlistentry>
@@ -944,7 +943,7 @@
<para>
The command
<userinput>rtedge -s1024 -o new.pix -c"set fg=0/255/0 bg=255/0/0" havoc.g havoc</userinput>
<userinput>rtedge -s1024 -o new.pix -c"set fg=0,255,0 bg=255,0,0" havoc.g havoc</userinput>
changes the edge color to be green and the background color to be red.
</para>
+12 -3
View File
@@ -6,6 +6,7 @@ set(mann_EN
Z.xml
adc.xml
ae.xml
alias-pix.xml
all_sf.xml
analyze.xml
anim_cascade.xml
@@ -52,6 +53,7 @@ set(mann_EN
cp.xml
cpi.xml
d.xml
dall.xml
db.xml
db_glob.xml
dbconcat.xml
@@ -80,10 +82,12 @@ set(mann_EN
em.xml
eqn.xml
erase.xml
erase_all.xml
ev.xml
exists.xml
exit.xml
expand.xml
export_body.xml
extrude.xml
eye_pt.xml
facedef.xml
@@ -92,11 +96,12 @@ set(mann_EN
fracture.xml
g.xml
garbage_collect.xml
gdiff.xml
gastank.xml
gqa.xml
gr.xml
graph.xml
gui.xml
handle.xml
help.xml
helpdevel.xml
helplib.xml
@@ -128,7 +133,6 @@ set(mann_EN
lt.xml
make.xml
make_pnts.xml
man.xml
mater.xml
matpick.xml
memprint.xml
@@ -149,6 +153,7 @@ set(mann_EN
pathlist.xml
paths.xml
permute.xml
picket_fence.xml
plot.xml
prcolor.xml
prefix.xml
@@ -199,7 +204,7 @@ set(mann_EN
sed.xml
setview.xml
shader.xml
shells.xml
shell.xml
showmats.xml
size.xml
solids.xml
@@ -227,6 +232,7 @@ set(mann_EN
vnirt.xml
voxelize.xml
vquery_ray.xml
vrmgr.xml
vrot.xml
wcodes.xml
whatid.xml
@@ -234,6 +240,9 @@ set(mann_EN
whichair.xml
whichid.xml
who.xml
window.xml
window_frame.xml
wire.xml
wmater.xml
x.xml
xpush.xml
@@ -2,7 +2,7 @@
<refmeta>
<refentrytitle>ALIAS-PIX</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
+1 -1
View File
@@ -31,7 +31,7 @@
<command>d</command> command (use the <command>who</command> command to see
a list of explicitly displayed objects). Objects that are displayed as members
of explicitly displayed combinations cannot be deleted from the display with
this command (see <command>erase -r</command>).
this command (see <command>dall</command> or <command>erase_all</command>).
Note that this has no effect on the <emphasis>BRL-CAD</emphasis> database
itself. To actually remove objects from the database, use the
<command>kill</command> command.
+62
View File
@@ -0,0 +1,62 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="dall">
<refmeta>
<refentrytitle>DALL</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>dall</refname>
<refpurpose>Deletes the specified list of objects from the <emphasis>mged</emphasis>
display. This is a synonym for the <command>erase_all</command>command.
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>dall</command>
<arg choice="req" rep="norepeat"><replaceable>objects</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>
Deletes the specified list of objects from the <emphasis>mged</emphasis>
display. This is a synonym for the <command>erase_all</command> command.
This command will allow the user to delete objects that have not been explicitly
displayed (unlike the <command>d</command> command). Note that this has no effect on the
<emphasis>BRL-CAD</emphasis> database itself. To actually remove objects from the database,
use the <command>kill</command>command.
</para>
</refsection>
<refsection xml:id="examples"><title>EXAMPLES</title>
<para>
The example shows the use of the <command>dall</command> command to delete a
region and a shape from the <emphasis>mged</emphasis> display, even if they
have not been explicitly displayed.
</para>
<example><title>Delete a region and a shape from the <emphasis>mged</emphasis> display,
even if they have not been explicitly displayed.</title>
<para><prompt>mged&gt;</prompt> <userinput>dall region1 shapea</userinput></para>
<para>Deletes <emphasis>region1</emphasis> and <emphasis>shapea</emphasis> from
the <emphasis>mged</emphasis> display.</para>
</example>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title><para>BRL-CAD Team</para></refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
+60
View File
@@ -0,0 +1,60 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="erase_all">
<refmeta>
<refentrytitle>ERASE_ALL</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>erase_all</refname>
<refpurpose>Deletes the specified list of objects from the MGED display.
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>erase_all</command>
<arg choice="req" rep="norepeat"><replaceable>objects</replaceable></arg>
<arg choice="opt" rep="norepeat"/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>Deletes the specified list of objects from the MGED display. It is a synonym for the <command>dall</command> command. It allows the user to delete objects that have not been explicitly displayed (unlike the <command>d </command> or <command>erase</command> commands). Note that this has no effect on the BRL-CAD database itself. To actually remove objects from the database, use the <command>kill</command> command.
</para>
</refsection>
<refsection xml:id="examples"><title>EXAMPLES</title>
<para>The example shows the use of the <command>erase_all</command> command to delete two objects from the MGED display.
</para>
<example><title>Delete objects from the MGED display.</title>
<variablelist>
<varlistentry>
<term><prompt>mged&gt;</prompt> <userinput>erase_all region1 shapea</userinput></term>
<listitem>
<para>Two objects, <emphasis>region1</emphasis> and <emphasis>shapea</emphasis>, are deleted from the MGED display.
</para>
</listitem>
</varlistentry>
</variablelist>
</example>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title><para>BRL-CAD Team</para></refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
+59
View File
@@ -0,0 +1,59 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="export_body">
<refmeta>
<refentrytitle>EXPORT_BODY</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>export_body</refname>
<refpurpose>Copies the contents of the specified binary <emphasis>object</emphasis> into the specified <emphasis>file</emphasis>.
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>export_body</command>
<arg choice="req" rep="norepeat"><replaceable>object file</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>Copies the contents of the specified binary <emphasis>object</emphasis> into the specified <emphasis>file</emphasis>. Currently, only binary objects containing a uniform
array of simple objects are supported.
</para>
</refsection>
<refsection xml:id="examples"><title>EXAMPLES</title>
<para>The example shows the use of the <command>export_body</command> command to copy the contents of a particular binary <emphasis>object</emphasis> into a specified <emphasis>file</emphasis>.
</para>
<example><title>Copy the contents of a binary object into a file.</title>
<variablelist>
<varlistentry>
<term><prompt>mged&gt;</prompt> <userinput>export_body bin_chars /home/fred/chars </userinput></term>
<listitem>
<para>Copies the contents of “bin_chars” into the file “/home/fred/chars.”
</para>
</listitem>
</varlistentry>
</variablelist>
</example>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title><para>BRL-CAD Team</para></refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
@@ -2,7 +2,7 @@
<refmeta>
<refentrytitle>GASTANK</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
-129
View File
@@ -1,129 +0,0 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="gdiffn">
<refmeta>
<refentrytitle>GDIFF</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>gdiff</refname>
<refpurpose>
a BRL-CAD differential geometry comparator
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>gdiff</command>
<arg choice="opt" rep="repeat"><replaceable>options</replaceable></arg>
<arg choice="plain"><replaceable>left_object</replaceable></arg>
<arg choice="plain"><replaceable>right_object</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>
<command>gdiff</command> compares BRL-CAD geometry objects using
LIBRT's solid raytracing capabilities and visualizes differences in
the display manager.
</para>
<para>
Red segments are those generated only from intersections with the <emphasis>left_obj</emphasis>
object while blue segments represent intersections unique to the <emphasis>right_obj</emphasis>
object. White segments represent intersections common to both objects. By default, only segments
unique to the left and/or right objects are displayed.
</para>
<para>
Users will want to pay careful attention to grid size. By default gdiff
will try to guess a reasonable grid spacing using the bounding boxes of the
objects in question, but depending on the visual quality of the result users
may want to adjust the spacing up or down. Be careful of specifying tolerances
that are too fine - performance will drop off rapidly as grid spacing becomes
very small.
</para>
</refsection>
<refsection xml:id="gdiff_mged_options"><title>OPTIONS</title>
<variablelist remap="TP">
<varlistentry>
<term><emphasis remap="B" role="bold">-h</emphasis></term>
<listitem>
<para>
Prints help.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-g #</emphasis></term>
<listitem>
<para>
Controls grid spacing. Units are mm.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-l</emphasis></term>
<listitem>
<para>
Visualize solid segments occurring only in the left object.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-r</emphasis></term>
<listitem>
<para>
Visualize solid segments occurring only in the right object.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-b</emphasis></term>
<listitem>
<para>
Visualize solid segments occurring in both the left and right object (i.e. common or shared volume).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">-G</emphasis></term>
<listitem>
<para>
Report differences in grazing hits. By default, differences are reported only when they can be
verified by shooting parallel rays offset around the original shotline reporting a difference.
This options disables that filter.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title>
<para>Clifford Yapp</para>
</refsection>
<refsection xml:id="copyright"><title>COPYRIGHT</title>
<para>
This software is Copyright (c) 2016 United States Government as
represented by the U.S. Army Research Laboratory.
</para>
</refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
<!-- vim: set shiftwidth=2 : -->
@@ -2,7 +2,7 @@
<refmeta>
<refentrytitle>HANDLE</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
-51
View File
@@ -1,51 +0,0 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man_MGED">
<refmeta>
<refentrytitle>MAN</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD MGED Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>man</refname>
<refpurpose>View manual pages.</refpurpose>
</refnamediv>
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>man</command>
<arg choice="req" rep="norepeat"><replaceable>cmdname</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>
Launches the <command>brlman</command> graphical man page viewer with
the man page documenting the specified MGED command name.
</para>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title>
<para>
BRL-CAD Team
</para>
</refsection>
<refsection xml:id="copyright"><title>COPYRIGHT</title>
<para>
This software is Copyright (c) 2016 United States Government as
represented by the U.S. Army Rebrlman Laboratory.
</para>
</refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
<!-- vim: set shiftwidth=2 : -->
@@ -2,7 +2,7 @@
<refmeta>
<refentrytitle>PICKET_FENCE</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
@@ -1,4 +1,4 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="shells">
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="shell">
<refmeta>
<refentrytitle>SHELL</refentrytitle>
@@ -8,7 +8,7 @@
</refmeta>
<refnamediv xml:id="name">
<refname>shells</refname>
<refname>shell</refname>
<refpurpose>Separates the specified NMG shape into its constituent shells.
</refpurpose>
</refnamediv>
+67
View File
@@ -0,0 +1,67 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="vrmgr">
<refmeta>
<refentrytitle>VRMGR</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD MGED Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>vrmgr</refname>
<refpurpose>Establishes a link between the current MGED display and a
<emphasis>vrmgr</emphasis> process running on the specified <emphasis>host</emphasis>.
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>vrmgr</command>
<arg choice="req" rep="norepeat"><replaceable>host</replaceable></arg>
<group choice="opt" rep="norepeat">
<arg choice="req" rep="norepeat">master</arg>
<arg choice="req" rep="norepeat">slave</arg>
<arg choice="req" rep="norepeat">overview</arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>Establishes a link between the current MGED display and a
<emphasis>vrmgr</emphasis> process running on the specified <emphasis>host</emphasis>. The <emphasis>vrmgr</emphasis> program is a manager for virtual reality displays using MGED. The <emphasis>vrmgr</emphasis> process must be started on <emphasis>host</emphasis> prior to executing the <command>vrmgr</command> command in MGED. The second command line argument to the <command>vrmgr</command> command is the role of the current MGED display. The <emphasis>master</emphasis> display controls the viewing parameters of itself and all the <emphasis>slave</emphasis> displays. The <emphasis>overview</emphasis> display acts as an observer of the entire virtual reality process.
</para>
</refsection>
<refsection xml:id="examples"><title>EXAMPLES</title>
<para>The example shows the use of the <command>vrmgr</command> command to set the current MGED display as the master for the <emphasis>vrmgr</emphasis> process running on the host.
</para>
<example><title>Set the current MGED display as the master for the <emphasis>vrmgr</emphasis> process running on the host.
</title>
<para>
<prompt>mged&gt;</prompt><userinput>vrmgr host1.arl.army.mil master</userinput>
</para>
<para>Sets the current MGED display as the <emphasis>master</emphasis> for the <emphasis>vrmgr</emphasis> process running on the host named <emphasis>host1.arl.army.mil</emphasis>.
</para>
</example>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title><para>BRL-CAD Team</para></refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
@@ -2,7 +2,7 @@
<refmeta>
<refentrytitle>WINDOW</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
@@ -2,7 +2,7 @@
<refmeta>
<refentrytitle>WINDOW_FRAME</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
@@ -2,7 +2,7 @@
<refmeta>
<refentrytitle>WIRE</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
+1 -1
View File
@@ -80,7 +80,7 @@ tops tree whatid whichair whichid</B>
Methods associated with
<A HREF="../librt/dg_obj.html#sect9">LIBRT's drawable geometry object</A>:<BR>
<DL>
<DD><B>assoc blast clear draw erase ev get_autoview
<DD><B>assoc blast clear draw erase erase_all ev get_autoview
illum label observer overlay report rt rtcheck vdraw who zap</B>
</DD>
</DL>
+1 -1
View File
@@ -56,7 +56,7 @@ The following commands are possible for drawable objects:
Methods associated with
<A HREF="../librt/dg_obj.html#sect9">LIBRT's drawable geometry object</A>:<BR>
<DL>
<DD><B>assoc blast clear draw erase ev get_autoview
<DD><B>assoc blast clear draw erase erase_all ev get_autoview
illum label observer overlay report rt rtcheck vdraw who zap</B>
</DD>
</DL>
+1 -1
View File
@@ -146,7 +146,7 @@ title tol tops tree whatid whichair whichid</B>
<P>
Methods associated with <A HREF="../librt/dg_obj.html#sect9">LIBRT's drawable geometry object</A>:<BR>
<DL>
<DD><B>blast clear draw erase ev
<DD><B>blast clear draw erase erase_all ev
get_autoview get_dgname illum label overlay
report rt rtcheck vdraw who zap</B>
</DD>
+2 -2
View File
@@ -80,13 +80,13 @@ region id based colors.
may be deleted with the ``erase'' command (use the <a href="#who">who</a>
command to see a list of explicitly displayed objects). Objects that are
displayed as members of explicitly displayed combinations cannot be
deleted from the display with this command (see <a href="#erase -r">erase -r</a>).
deleted from the display with this command (see <a href="#erase_all">erase_all</a>).
Note that this has no effect on the
<I>BRL&#173CAD</I> database itself. To actually remove objects from the
database, use the <a href="#kill">kill</a> command.
</DD>
<P>
<DT><I>dgName</I> <A NAME="erase -r"><B>erase -r</B></A> <I>&lt;objects&gt</I></DT>
<DT><I>dgName</I> <A NAME="erase_all"><B>erase_all</B></A> <I>&lt;objects&gt</I></DT>
<DD>Delete the specified list of objects from the display list.
This command will allow the user to delete objects
that have not been explicitly displayed (unlike the <a href="#erase">erase</a> command).
+43 -2
View File
@@ -110,6 +110,8 @@
<FONT SIZE=2><P></FONT><A HREF="#cpi"><FONT SIZE=2>cpi</FONT></A></TD>
<TD WIDTH="20%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#d"><FONT SIZE=2>d</FONT></A></TD>
<TD WIDTH="22%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#dall"><FONT SIZE=2>dall</FONT></A></TD>
<TD WIDTH="21%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#db"><FONT SIZE=2>db</FONT></A></TD>
</TR>
@@ -163,6 +165,8 @@
<FONT SIZE=2><P></FONT><A HREF="#em"><FONT SIZE=2>em</FONT></A></TD>
<TD WIDTH="20%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#erase"><FONT SIZE=2>erase</FONT></A></TD>
<TD WIDTH="22%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#erase_all"><FONT SIZE=2>erase_all</FONT></A></TD>
<TD WIDTH="21%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#ev"><FONT SIZE=2>ev</FONT></A></TD>
</TR>
@@ -170,6 +174,8 @@
<FONT SIZE=2><P></FONT><A HREF="#exit"><FONT SIZE=2>exit</FONT></A></TD>
<TD WIDTH="19%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#expand"><FONT SIZE=2>expand</FONT></A></TD>
<TD WIDTH="20%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#export_body"><FONT SIZE=2>export_body</FONT></A></TD>
<TD WIDTH="22%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#expand_comb"><FONT SIZE=2>expand_comb</FONT></A></TD>
<TD WIDTH="21%" VALIGN="MIDDLE">
@@ -461,6 +467,9 @@
<FONT SIZE=2><P></FONT><A HREF="#vnirt"><FONT SIZE=2>vnirt</FONT></A></TD>
<TD WIDTH="20%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#vquery_ray"><FONT SIZE=2>vquery_ray</FONT></A></TD>
<TD WIDTH="22%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#vrmgr"><FONT SIZE=2>vrmgr</FONT></A></TD>
<TD WIDTH="21%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#vrot"><FONT SIZE=2>vrot</FONT></A></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="MIDDLE">
@@ -1083,12 +1092,20 @@
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="d"></A>d</B> <I>&lt;objects</I>&gt;</DT>
<DD>The &quot;d&quot; command deletes the specified list of objects from the <I>mged</I> display. This is a synonym for the <A HREF="#erase">erase</A> command. Only objects that have been explicitly displayed may be deleted with the &quot;d&quot; command (use the <A HREF="#who">who</A> command to see a list of explicitly displayed objects). Objects that are displayed as members of explicitly displayed combinations cannot be deleted from the display with this command (see <A HREF="#erase">erase -r</A>). Note that this has no effect on the <I>BRL-CAD</I> database itself. To actually remove objects from the database, use the <A HREF="#kill">kill</A> command.</DD>
<DD>The &quot;d&quot; command deletes the specified list of objects from the <I>mged</I> display. This is a synonym for the <A HREF="#erase">erase</A> command. Only objects that have been explicitly displayed may be deleted with the &quot;d&quot; command (use the <A HREF="#who">who</A> command to see a list of explicitly displayed objects). Objects that are displayed as members of explicitly displayed combinations cannot be deleted from the display with this command (see <A HREF="#dall">dall</A> or <A HREF="#erase_all">erase_all</A>). Note that this has no effect on the <I>BRL-CAD</I> database itself. To actually remove objects from the database, use the <A HREF="#kill">kill</A> command.</DD>
<FONT SIZE=4><DT>Examples:</DT>
</FONT><TT><DD>mged&gt;</TT> <B>d region1 shapea</DD>
</DL>
</B><FONT SIZE=2><P>-- Delete <I>region1</I> and <I>shapea</I> from the <I>mged</I> display. </P>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="dall"></A>dall</B> <I>&lt;objects</I>&gt;</DT>
<DD>The &quot;dall&quot; command deletes the specified list of objects from the <I>mged</I> display. This is a synonym for the <A HREF="#erase_all">erase_all</A> command. This command will allow the user to delete objects that have not been explicitly displayed (unlike the <A HREF="#d">d</A> command). Note that this has no effect on the <I>BRL-CAD</I> database itself. To actually remove objects from the database, use the <A HREF="#kill">kill</A> command.</DD>
<FONT SIZE=4><DT>Examples:</DT>
</FONT><TT><DD>mged&gt;</TT> <B>dall region1 shapea</DD>
</DL>
</B><FONT SIZE=2><P>-- Delete <I>region1</I> and <I>shapea</I> from the <I>mged</I> display. </P>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="db"></A>db</B> <I>command</I> [<I>args...</I>]</DT>
@@ -1449,13 +1466,21 @@ l r230 r231 r232 r233 r234 r235 r236 r237 r238 r239 <BR>
<DD><HR ALIGN="RIGHT"></DD></DIR>
<B><DT>erase</B> <I>&lt;objects</I>&gt;</DT>
<DD>The &quot;erase&quot; command deletes the specified list of objects from the MGED<I> </I>display. This is a synonym for the <A HREF="#d">d</A> command. Only objects that have been explicitly displayed may be deleted with the &quot;erase&quot; command (use the <A HREF="#who">who</A> command to see a list of explicitly displayed objects). Objects that are displayed as members of explicitly displayed combinations cannot be deleted from the display with this command (see <A HREF="#erase">erase -r</A>). Note that this has no effect on the <I>BRL-CAD</I> database itself. To actually remove objects from the database, use the <A HREF="#kill">kill</A> command.</DD>
<DD>The &quot;erase&quot; command deletes the specified list of objects from the MGED<I> </I>display. This is a synonym for the <A HREF="#d">d</A> command. Only objects that have been explicitly displayed may be deleted with the &quot;erase&quot; command (use the <A HREF="#who">who</A> command to see a list of explicitly displayed objects). Objects that are displayed as members of explicitly displayed combinations cannot be deleted from the display with this command (see <A HREF="#dall">dall</A> or <A HREF="#erase_all">erase_all</A>). Note that this has no effect on the <I>BRL-CAD</I> database itself. To actually remove objects from the database, use the <A HREF="#kill">kill</A> command.</DD>
<FONT SIZE=4><DT>Examples:</DT>
</FONT><TT><DD>mged&gt;</TT> <B>erase region1 shapea</DD>
</DL>
</B><FONT SIZE=2><P>-- Delete <I>region1</I> and <I>shapea</I> from the MGED display. </P>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="erase_all"></A>erase_all</B> <I>&lt;objects</I>&gt;</DT>
<DD>The &quot;erase_all&quot; command deletes the specified list of objects from the MGED display. This is a synonym for the <A HREF="#dall">dall</A> command. This command will allow the user to delete objects that have not been explicitly displayed (unlike the <A HREF="#d">d</A> or <A HREF="#erase">erase</A> commands). Note that this has no effect on the <I>BRL-CAD</I> database itself. To actually remove objects from the database, use the <A HREF="#kill">kill</A> command.</DD>
<FONT SIZE=4><DT>Examples:</DT>
</FONT><TT><DD>mged&gt;</TT> <B>erase_all region1 shapea</DD>
</DL>
</B><FONT SIZE=2><P>-- Delete <I>region1</I> and <I>shapea</I> from the MGED display. </P>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="ev"></A>ev</B> [<I>-dfnrstuvwST</I>] [<I>-P#</I>] [-C#/#/#] &lt;<I>objects</I>&gt;</DT>
<DD>The &quot;ev&quot; command evaluates the <I>objects</I> specified by tessellating all <A HREF="#SOLID">primitive shapes</A> in the objects and then performing any <A HREF="#BOOLEAN">Boolean operations</A> specified in the <I>objects</I>. The result is then displayed in the MGED display according to the specified options:</DD>
</DL>
@@ -1503,6 +1528,13 @@ l r230 r231 r232 r233 r234 r235 r236 r237 r238 r239 <BR>
</B><FONT SIZE=2><P>-- Display a list of all database object names that end in &quot;.r&quot;. </P>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="export_body"></A>export_body <I>object file </DT>
</B></I><DD>The &quot;export_body&quot; command is used to copy the contents of the specified binary <I>object</I> into the specified <I>file</I>. Currently, only binary objects containing a uniform array of simple objects is supported. </DD>
<DT></DT>
<FONT SIZE=4><DD>Examples: </DD>
</FONT><TT><DD>mged&gt;</TT> <B>export_body bin_chars /home/fred/chars</DD>
</B><DD>-- Copy the contents of &quot;bin_chars&quot; into the file &quot;/home/fred/chars&quot;</DD>
<DT><HR ALIGN="RIGHT"></DT>
<DT><b><a name="expand_comb"></a>expand_comb <i>prefix comb ...</i></DT>
<DD>The <i>expand_comb</i> will create a new combination object <i>prefix</i>.
For each Boolean node in the original tree of the combination a new
@@ -3478,6 +3510,15 @@ All textual arguments may be abbreviated by their first letter. </P>
<DT><A NAME="vquery_ray"></A>vquery_ray</B> <I>x y</DT>
</I><DD>Same as <A HREF="#vnirt">vnirt</A>.</DD>
</DL>
<FONT SIZE=2><P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="vrmgr"></A>vrmgr</B> <I>host</I> {<I>master</I> | <I>slave</I> | <I>overview</I>}</DT>
<DD>The &quot;vrmgr&quot; command establishes a link between the current MGED display and a <I>vrmgr</I> process running on the specified <I>host</I>. The <I>vrmgr</I> program is a manager for virtual reality displays using MGED. The <I>vrmgr</I> process must be started on <I>host</I> prior to executing the <I>vrmgr</I> command in MGED. The second command line argument to the <I>vrmgr</I> command is the role of the current MGED display. The <I>master</I> display controls the viewing parameters of itself and all the <I>slave</I> displays. The <I>overview</I> display acts as an observer of the entire virtual reality process.</DD>
<FONT SIZE=4><DT>Examples:</DT>
</FONT><TT><DD>mged&gt;</TT> <B>vrmgr host1.brlcad.org master</DD>
</DL><DIR>
</B><FONT SIZE=2><P>-- Set the current MGED display as the <I>master</I> for the <I>vrmgr</I> process running on the host named <I>host1.brlcad.org.</I> </P></DIR>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
+5 -1
View File
@@ -1007,6 +1007,7 @@
****** [[file:../doc/docbook/system/mann/en/facedef.xml][facedef.xml]]
****** [[file:../doc/docbook/system/mann/en/rcc-cap.xml][rcc-cap.xml]]
****** [[file:../doc/docbook/system/mann/en/quit.xml][quit.xml]]
****** [[file:../doc/docbook/system/mann/en/vrmgr.xml][vrmgr.xml]]
****** [[file:../doc/docbook/system/mann/en/make.xml][make.xml]]
****** [[file:../doc/docbook/system/mann/en/whichair.xml][whichair.xml]]
****** [[file:../doc/docbook/system/mann/en/viewsize.xml][viewsize.xml]]
@@ -1036,6 +1037,7 @@
****** [[file:../doc/docbook/system/mann/en/attr.xml][attr.xml]]
****** [[file:../doc/docbook/system/mann/en/dup.xml][dup.xml]]
****** [[file:../doc/docbook/system/mann/en/eye_pt.xml][eye_pt.xml]]
****** [[file:../doc/docbook/system/mann/en/dall.xml][dall.xml]]
****** [[file:../doc/docbook/system/mann/en/bot_split.xml][bot_split.xml]]
****** [[file:../doc/docbook/system/mann/en/copymat.xml][copymat.xml]]
****** [[file:../doc/docbook/system/mann/en/read_muves.xml][read_muves.xml]]
@@ -1072,7 +1074,7 @@
****** [[file:../doc/docbook/system/mann/en/preview.xml][preview.xml]]
****** [[file:../doc/docbook/system/mann/en/search.xml][search.xml]]
****** [[file:../doc/docbook/system/mann/en/brep.xml][brep.xml]]
****** [[file:../doc/docbook/system/mann/en/erase.xml][erase.xml]]
****** [[file:../doc/docbook/system/mann/en/erase_all.xml][erase_all.xml]]
****** [[file:../doc/docbook/system/mann/en/expand.xml][expand.xml]]
****** [[file:../doc/docbook/system/mann/en/xpush.xml][xpush.xml]]
****** [[file:../doc/docbook/system/mann/en/pull.xml][pull.xml]]
@@ -1081,6 +1083,7 @@
****** [[file:../doc/docbook/system/mann/en/l.xml][l.xml]]
****** [[file:../doc/docbook/system/mann/en/handle.xml][handle.xml]]
****** [[file:../doc/docbook/system/mann/en/edmater.xml][edmater.xml]]
****** [[file:../doc/docbook/system/mann/en/export_body.xml][export_body.xml]]
****** [[file:../doc/docbook/system/mann/en/tol.xml][tol.xml]]
****** [[file:../doc/docbook/system/mann/en/exists.xml][exists.xml]]
****** [[file:../doc/docbook/system/mann/en/title.xml][title.xml]]
@@ -12811,6 +12814,7 @@
*** [[file:../regress/mged/rotobj.mged][rotobj.mged]]
*** [[file:../regress/mged/i.mged][i.mged]]
*** [[file:../regress/mged/run_test][run_test]]
*** [[file:../regress/mged/dall.mged][dall.mged]]
*** [[file:../regress/mged/mvall.mged][mvall.mged]]
*** [[file:../regress/mged/center.mged][center.mged]]
*** [[file:../regress/mged/push.mged][push.mged]]
+125 -35
View File
@@ -28,8 +28,11 @@
#define BREP_BBNODE_H
#include "common.h"
#include "brep.h"
#include "brep/defines.h"
#include "brep/ray.h"
#include "brep/brnode.h"
#include "brep/curvetree.h"
#include "brep/util.h"
/** @{ */
/** @file brep/bbnode.h */
@@ -62,22 +65,18 @@ extern "C++" {
/**
* Bounding Box Hierarchy Node
*/
class BREP_EXPORT BBNode : public PooledObject<BBNode> {
class BREP_EXPORT BBNode {
public:
explicit BBNode(const ON_BoundingBox &node, const CurveTree *ct = NULL);
BBNode(const CurveTree *ct,
const ON_BoundingBox &node,
const ON_BrepFace *face,
const ON_Interval &u,
const ON_Interval &v,
bool checkTrim,
bool trimmed);
~BBNode();
BBNode(Deserializer &deserieralizer, const CurveTree &ctree);
void serialize(Serializer &serializer) const;
const ON_BrepFace &get_face() const;
/** Test if this node is a leaf node in the hierarchy */
bool isLeaf() const;
@@ -123,12 +122,14 @@ extern "C++" {
void BuildBBox();
bool prepTrims();
const std::vector<BBNode *> &get_children() const;
/** List of all children of a given node */
std::vector<BBNode *> * const m_children;
/** Bounding Box */
ON_BoundingBox m_node;
/** Surface Information */
const ON_BrepFace *m_face;
ON_Interval m_u;
ON_Interval m_v;
@@ -144,15 +145,12 @@ extern "C++" {
/* Normal at the m_estimate point */
ON_3dVector m_normal;
/** Curve Tree associated with the parent Surface Tree */
const CurveTree * const m_ctree;
private:
BBNode(const BBNode &source);
BBNode &operator=(const BBNode &source);
void removeChild(BBNode *child);
bool intersectedBy(const ON_Ray &ray, double *tnear = NULL, double *tfar = NULL) const;
/** Report if a given uv point is within the uv boundaries defined
@@ -160,22 +158,76 @@ extern "C++" {
*/
bool containsUV(const ON_2dPoint &uv) const;
bool doTrimming() const;
void getTrimsAbove(const ON_2dPoint &uv, std::list<const BRNode *> &out_leaves) const;
const BBNode *closer(const ON_3dPoint &pt, const BBNode *left, const BBNode *right) const;
struct Stl : public PooledObject<Stl> {
Stl() : m_children(), m_trims_above() {}
/** Curve Tree associated with the parent Surface Tree */
const CurveTree * const m_ctree;
std::vector<BBNode *> m_children;
std::list<const BRNode *> m_trims_above;
} * const m_stl;
std::list<const BRNode *> * const m_trims_above;
};
inline
BBNode::BBNode(const ON_BoundingBox &node, const CurveTree *ct) :
m_children(new std::vector<BBNode *>),
m_node(node),
m_face(NULL),
m_u(),
m_v(),
m_checkTrim(true),
m_trimmed(false),
m_estimate(),
m_normal(),
m_ctree(ct),
m_trims_above(new std::list<const BRNode *>)
{
for (int i = 0; i < 3; i++) {
double d = m_node.m_max[i] - m_node.m_min[i];
if (ON_NearZero(d, ON_ZERO_TOLERANCE)) {
m_node.m_min[i] -= 0.001;
m_node.m_max[i] += 0.001;
}
}
}
inline
_BU_ATTR_ALWAYS_INLINE
BBNode::BBNode(
const CurveTree *ct,
const ON_BoundingBox &node,
const ON_BrepFace *face,
const ON_Interval &u,
const ON_Interval &v,
bool checkTrim,
bool trimmed):
m_children(new std::vector<BBNode *>),
m_node(node),
m_face(face),
m_u(u),
m_v(v),
m_checkTrim(checkTrim),
m_trimmed(trimmed),
m_estimate(),
m_normal(),
m_ctree(ct),
m_trims_above(new std::list<const BRNode *>)
{
for (int i = 0; i < 3; i++) {
double d = m_node.m_max[i] - m_node.m_min[i];
if (ON_NearZero(d, ON_ZERO_TOLERANCE)) {
m_node.m_min[i] -= 0.001;
m_node.m_max[i] += 0.001;
}
}
}
inline void
BBNode::addChild(BBNode *child)
{
if (LIKELY(child != NULL)) {
m_stl->m_children.push_back(child);
m_children->push_back(child);
}
}
@@ -183,33 +235,23 @@ extern "C++" {
BBNode::removeChild(BBNode *child)
{
std::vector<BBNode *>::iterator i;
for (i = m_stl->m_children.begin(); i != m_stl->m_children.end();) {
for (i = m_children->begin(); i != m_children->end();) {
if (*i == child) {
delete *i;
i = m_stl->m_children.erase(i);
i = m_children->erase(i);
} else {
++i;
}
}
}
inline const ON_BrepFace &
BBNode::get_face() const
{
return *m_ctree->m_face;
}
inline const std::vector<BBNode *> &
BBNode::get_children() const
{
return m_stl->m_children;
}
inline bool
BBNode::isLeaf() const
{
return m_stl->m_children.empty();
if (m_children->empty()) {
return true;
}
return false;
}
inline void
@@ -234,6 +276,54 @@ extern "C++" {
max[2] = m_node.m_max[2];
}
inline bool
BBNode::intersectedBy(const ON_Ray &ray, double *tnear_opt /* = NULL */, double *tfar_opt /* = NULL */) const
{
double tnear = -DBL_MAX;
double tfar = DBL_MAX;
bool untrimmedresult = true;
for (int i = 0; i < 3; i++) {
if (UNLIKELY(ON_NearZero(ray.m_dir[i]))) {
if (ray.m_origin[i] < m_node.m_min[i] || ray.m_origin[i] > m_node.m_max[i]) {
untrimmedresult = false;
}
} else {
double t1 = (m_node.m_min[i] - ray.m_origin[i]) / ray.m_dir[i];
double t2 = (m_node.m_max[i] - ray.m_origin[i]) / ray.m_dir[i];
if (t1 > t2) {
double tmp = t1; /* swap */
t1 = t2;
t2 = tmp;
}
V_MAX(tnear, t1);
V_MIN(tfar, t2);
if (tnear > tfar) { /* box is missed */
untrimmedresult = false;
}
/* go ahead and solve hits behind us
if (tfar < 0) untrimmedresult = false;
*/
}
}
if (LIKELY(tnear_opt != NULL && tfar_opt != NULL)) {
*tnear_opt = tnear;
*tfar_opt = tfar;
}
if (isLeaf()) {
return !m_trimmed && untrimmedresult;
} else {
return untrimmedresult;
}
}
inline bool
BBNode::doTrimming() const
{
return m_checkTrim;
}
} /* namespace brlcad */
} /* extern C++ */
+143 -22
View File
@@ -36,7 +36,7 @@ extern "C++" {
/* @endcond */
}
#endif
#include "brep.h"
#include "brep/defines.h"
/** @{ */
/** @file brep/brnode.h */
@@ -51,11 +51,10 @@ extern "C++" {
/**
* Bounding Rectangle Hierarchy
*/
class BREP_EXPORT BRNode : public PooledObject<BRNode> {
class BREP_EXPORT BRNode {
public:
explicit BRNode(const ON_BoundingBox &node);
BRNode(const ON_Curve *curve,
int trim_index,
int adj_face_index,
const ON_BoundingBox &node,
const ON_BrepFace *face,
@@ -65,9 +64,6 @@ extern "C++" {
bool trimmed);
~BRNode();
BRNode(Deserializer &deserializer, const ON_Brep &brep);
void serialize(Serializer &serializer) const;
/** Node management functions */
void addChild(BRNode *child);
@@ -111,7 +107,7 @@ extern "C++" {
bool m_XIncreasing;
bool m_Horizontal;
bool m_Vertical;
bool m_innerTrim;
const bool m_innerTrim;
private:
BRNode(const BRNode &source);
@@ -122,34 +118,152 @@ extern "C++" {
/** Test if this node is a leaf node (i.e. m_children is empty) */
bool isLeaf() const;
bool doTrimming() const;
fastf_t getLinearEstimateOfV(fastf_t u) const;
const BRNode *closer(const ON_3dPoint &pt, const BRNode *left, const BRNode *right) const;
struct Stl : public PooledObject<Stl> {
Stl() : m_children() {}
/** List of all children of a given node */
std::vector<const BRNode *> * const m_children;
std::vector<const BRNode *> m_children;
} * const m_stl;
const ON_BrepFace *m_face;
const ON_BrepFace * const m_face;
ON_Interval m_u;
const ON_Curve *m_trim;
int m_trim_index;
const ON_Curve * const m_trim;
ON_Interval m_t;
bool m_checkTrim;
bool m_trimmed;
ON_3dPoint m_estimate;
const bool m_checkTrim;
const bool m_trimmed;
const ON_3dPoint m_estimate;
fastf_t m_slope;
fastf_t m_bb_diag;
ON_3dPoint m_start;
ON_3dPoint m_end;
};
inline
_BU_ATTR_ALWAYS_INLINE
BRNode::BRNode(
const ON_Curve *curve,
int adj_face_index,
const ON_BoundingBox &node,
const ON_BrepFace *face,
const ON_Interval &t,
bool innerTrim,
bool checkTrim,
bool trimmed) :
m_node(node),
m_v(),
m_adj_face_index(adj_face_index),
m_XIncreasing(false),
m_Horizontal(false),
m_Vertical(false),
m_innerTrim(innerTrim),
m_children(new std::vector<const BRNode *>),
m_face(face),
m_u(),
m_trim(curve),
m_t(t),
m_checkTrim(checkTrim),
m_trimmed(trimmed),
m_estimate(),
m_slope(0.0),
m_bb_diag(0.0),
m_start(curve->PointAt(m_t[0])),
m_end(curve->PointAt(m_t[1]))
{
/* check for vertical segments they can be removed from trims
* above (can't tell direction and don't need
*/
m_Horizontal = false;
m_Vertical = false;
/*
* should be okay since we split on Horz/Vert tangents
*/
if (m_end[X] < m_start[X]) {
m_u[0] = m_end[X];
m_u[1] = m_start[X];
} else {
m_u[0] = m_start[X];
m_u[1] = m_end[X];
}
if (m_end[Y] < m_start[Y]) {
m_v[0] = m_end[Y];
m_v[1] = m_start[Y];
} else {
m_v[0] = m_start[Y];
m_v[1] = m_end[Y];
}
if (NEAR_EQUAL(m_end[X], m_start[X], 0.000001)) {
m_Vertical = true;
if (m_innerTrim) {
m_XIncreasing = false;
} else {
m_XIncreasing = true;
}
} else if (NEAR_EQUAL(m_end[Y], m_start[Y], 0.000001)) {
m_Horizontal = true;
if ((m_end[X] - m_start[X]) > 0.0) {
m_XIncreasing = true;
} else {
m_XIncreasing = false;
}
m_slope = 0.0;
} else {
if ((m_end[X] - m_start[X]) > 0.0) {
m_XIncreasing = true;
} else {
m_XIncreasing = false;
}
m_slope = (m_end[Y] - m_start[Y]) / (m_end[X] - m_start[X]);
}
m_bb_diag = DIST_PT_PT(m_start, m_end);
}
inline
_BU_ATTR_ALWAYS_INLINE
BRNode::BRNode(const ON_BoundingBox &node) :
m_node(node),
m_v(),
m_adj_face_index(-99),
m_XIncreasing(false),
m_Horizontal(false),
m_Vertical(false),
m_innerTrim(false),
m_children(new std::vector<const BRNode *>),
m_face(NULL),
m_u(),
m_trim(NULL),
m_t(),
m_checkTrim(true),
m_trimmed(false),
m_estimate(),
m_slope(0.0),
m_bb_diag(0.0),
m_start(ON_3dPoint::UnsetPoint),
m_end(ON_3dPoint::UnsetPoint)
{
for (int i = 0; i < 3; i++) {
double d = m_node.m_max[i] - m_node.m_min[i];
if (NEAR_ZERO(d, ON_ZERO_TOLERANCE)) {
m_node.m_min[i] -= 0.001;
m_node.m_max[i] += 0.001;
}
}
m_start = m_node.m_min;
m_end = m_node.m_max;
}
inline void
BRNode::addChild(BRNode *child)
{
if (LIKELY(child != NULL)) {
m_stl->m_children.push_back(child);
m_children->push_back(child);
}
}
@@ -157,10 +271,10 @@ extern "C++" {
BRNode::removeChild(BRNode *child)
{
std::vector<const BRNode *>::iterator i;
for (i = m_stl->m_children.begin(); i != m_stl->m_children.end();) {
for (i = m_children->begin(); i != m_children->end();) {
if (*i == child) {
delete *i;
i = m_stl->m_children.erase(i);
i = m_children->erase(i);
} else {
++i;
}
@@ -170,13 +284,14 @@ extern "C++" {
inline bool
BRNode::isLeaf() const
{
if (m_stl->m_children.empty()) {
if (m_children->empty()) {
return true;
}
return false;
}
inline void
_BU_ATTR_ALWAYS_INLINE
BRNode::GetBBox(fastf_t *min, fastf_t *max) const
{
VSETALL(min, INFINITY);
@@ -189,6 +304,12 @@ extern "C++" {
}
}
inline bool
BRNode::doTrimming() const
{
return m_checkTrim;
}
extern bool sortX(const BRNode *first, const BRNode *second);
extern bool sortY(const BRNode *first, const BRNode *second);
+8 -26
View File
@@ -28,8 +28,8 @@
#define BREP_CURVETREE_H
#include "common.h"
#include "brep.h"
#include "brep/defines.h"
#include "brep/brnode.h"
/** @{ */
/** @file brep/curvetree.h */
@@ -39,24 +39,16 @@
__BEGIN_DECLS
extern "C++" {
#include <map>
namespace brlcad {
/**
* CurveTree declaration
*/
class BREP_EXPORT CurveTree : public PooledObject<CurveTree> {
class BREP_EXPORT CurveTree {
public:
explicit CurveTree(const ON_BrepFace *face);
~CurveTree();
CurveTree(Deserializer &deserializer, const ON_BrepFace &face);
void serialize(Serializer &serializer) const;
std::vector<std::size_t> serialize_get_leaves_keys(const std::list<const BRNode *> &leaves) const;
std::list<const BRNode *> serialize_get_leaves(const std::size_t *keys, std::size_t num_keys) const;
void serialize_cleanup() const;
/**
* Return just the leaves of the surface tree
*/
@@ -66,8 +58,6 @@ extern "C++" {
void getLeavesRight(std::list<const BRNode *> &out_leaves, const ON_2dPoint &pt, fastf_t tol) const;
private:
friend class BBNode;
CurveTree(const CurveTree &source);
CurveTree &operator=(const CurveTree &source);
@@ -87,21 +77,13 @@ extern "C++" {
bool getHVTangents(const ON_Curve *curve, const ON_Interval &t, std::list<fastf_t> &list) const;
bool isLinear(const ON_Curve *curve, double min, double max) const;
BRNode *subdivideCurve(const ON_Curve *curve, int trim_index, int adj_face_index, double min, double max, bool innerTrim, int depth) const;
BRNode *curveBBox(const ON_Curve *curve, int trim_index, int adj_face_index, const ON_Interval &t, bool isLeaf, bool innerTrim, const ON_BoundingBox &bb) const;
static ON_BoundingBox initialLoopBBox(const ON_BrepFace &face);
BRNode *subdivideCurve(const ON_Curve *curve, int adj_face_index, double min, double max, bool innerTrim, int depth) const;
BRNode *curveBBox(const ON_Curve *curve, int adj_face_index, const ON_Interval &t, bool isLeaf, bool innerTrim, const ON_BoundingBox &bb) const;
BRNode *initialLoopBBox() const;
const ON_BrepFace * const m_face;
BRNode *m_root;
struct Stl : public PooledObject<Stl> {
Stl() : m_sortedX() {}
std::vector<const BRNode *> m_sortedX;
} * const m_stl;
mutable std::map<const BRNode *, std::size_t> *m_sortedX_indices;
BRNode * const m_root;
std::list<const BRNode *> * const m_sortedX;
};
+1 -242
View File
@@ -28,26 +28,16 @@
#define BREP_UTIL_H
#include "common.h"
#include "brep/defines.h"
/** @{ */
/** @file brep/util.h */
#ifdef __cplusplus
#include "brep.h"
#include "bu/cv.h"
#include "bu/endian.h"
#include "bu/log.h"
#include "bu/malloc.h"
#include "bu/parse.h"
#include <arpa/inet.h>
__BEGIN_DECLS
extern "C++" {
#include <cstring>
BREP_EXPORT bool ON_NearZero(double x, double tolerance = ON_ZERO_TOLERANCE);
@@ -103,237 +93,6 @@ extern "C++" {
BREP_EXPORT void set_key(struct bu_vls *key, int k, int *karray);
class Serializer
{
public:
Serializer() :
m_capacity(1024 * 1024),
m_external()
{
BU_EXTERNAL_INIT(&m_external);
m_external.ext_buf = static_cast<uint8_t *>(bu_malloc(m_capacity, "m_external"));
}
~Serializer()
{
bu_free_external(&m_external);
}
bu_external take()
{
const bu_external result = m_external;
m_capacity = 1024 * 1024;
BU_EXTERNAL_INIT(&m_external);
m_external.ext_buf = static_cast<uint8_t *>(bu_malloc(m_capacity, "m_external"));
return result;
}
void write_uint8(uint8_t value)
{
uint8_t * const dest = extend(sizeof(value));
*dest = value;
}
void write_uint32(uint32_t value)
{
uint8_t * const dest = extend(SIZEOF_NETWORK_LONG);
const uint32_t out_value = htonl(value);
std::memcpy(dest, &out_value, SIZEOF_NETWORK_LONG);
}
void write_int32(int32_t value)
{
uint8_t * const dest = extend(SIZEOF_NETWORK_LONG);
long out_value = value;
if (UNLIKELY(1 != bu_cv_htonsl(dest, SIZEOF_NETWORK_LONG, &out_value, 1)))
bu_bomb("bu_cv_htonsl() failed");
}
void write_double(double value)
{
uint8_t * const dest = extend(SIZEOF_NETWORK_DOUBLE);
bu_cv_htond(dest, reinterpret_cast<const unsigned char *>(&value), 1);
}
void write(const ON_3dPoint &value)
{
write_double(value.x);
write_double(value.y);
write_double(value.z);
}
void write(const ON_BoundingBox &value)
{
write(value.m_min);
write(value.m_max);
}
void write(const ON_Interval &value)
{
write_double(value.m_t[0]);
write_double(value.m_t[1]);
}
private:
Serializer(const Serializer &source);
Serializer &operator=(const Serializer &source);
uint8_t *extend(std::size_t size)
{
const std::size_t position = m_external.ext_nbytes;
m_external.ext_nbytes += size;
if (m_external.ext_nbytes > m_capacity) {
m_capacity = m_external.ext_nbytes * 2;
m_external.ext_buf = static_cast<uint8_t *>(bu_realloc(m_external.ext_buf, m_capacity, "m_external"));
}
return &m_external.ext_buf[position];
}
std::size_t m_capacity;
bu_external m_external;
};
class Deserializer
{
public:
Deserializer(const bu_external &external) :
m_position(0),
m_external(external)
{
BU_CK_EXTERNAL(&m_external);
}
~Deserializer()
{
if (m_position != m_external.ext_nbytes)
bu_bomb("did not deserialize entire stream");
}
uint8_t read_uint8()
{
return *get(1);
}
uint32_t read_uint32()
{
uint32_t result;
std::memcpy(&result, get(SIZEOF_NETWORK_LONG), SIZEOF_NETWORK_LONG);
return ntohl(result);
}
int32_t read_int32()
{
long result;
if (UNLIKELY(1 != bu_cv_ntohsl(&result, sizeof(result), const_cast<void *>(reinterpret_cast<const void *>(get(SIZEOF_NETWORK_LONG))), 1)))
bu_bomb("bu_cv_ntohsl() failed");
return result;
}
double read_double()
{
double result;
bu_cv_ntohd(reinterpret_cast<unsigned char *>(&result), get(SIZEOF_NETWORK_DOUBLE), 1);
return result;
}
void read(ON_3dPoint &value)
{
value.x = read_double();
value.y = read_double();
value.z = read_double();
}
void read(ON_3dVector &value)
{
value.x = read_double();
value.y = read_double();
value.z = read_double();
}
void read(ON_BoundingBox &value)
{
read(value.m_min);
read(value.m_max);
}
void read(ON_Interval &value)
{
value.m_t[0] = read_double();
value.m_t[1] = read_double();
}
private:
Deserializer(const Deserializer &source);
Deserializer &operator=(const Deserializer &source);
const uint8_t *get(std::size_t size)
{
const std::size_t result_position = m_position;
m_position += size;
if (UNLIKELY(m_position > m_external.ext_nbytes))
bu_bomb("invalid position");
return &m_external.ext_buf[result_position];
}
std::size_t m_position;
const bu_external &m_external;
};
template <typename T>
class PooledObject
{
public:
static void *operator new(std::size_t size)
{
if (UNLIKELY(size != sizeof(T)))
throw std::bad_alloc();
return bu_heap_get(size);
}
static void operator delete(void *pointer)
{
bu_heap_put(pointer, sizeof(T));
}
};
} /* extern C++ */
__END_DECLS
+1 -1
View File
@@ -86,7 +86,7 @@
#include "./bu/parallel.h"
#include "./bu/parse.h"
#include "./bu/ptbl.h"
#include "./bu/redblack.h"
#include "./bu/rb.h"
#include "./bu/simd.h"
#include "./bu/sort.h"
#include "./bu/str.h"
+1 -1
View File
@@ -23,7 +23,7 @@ set(bu_headers
parse.h
path.h
ptbl.h
redblack.h
rb.h
simd.h
sort.h
str.h
+1 -2
View File
@@ -61,7 +61,7 @@ typedef struct bu_color bu_color_t;
#define BU_CK_COLOR(_c) BU_CKMAG(_c, BU_COLOR_MAGIC, "bu_color")
/**
* initializes a bu_color struct without allocating any memory.
* initializes a bu_bitv struct without allocating any memory.
*/
#define BU_COLOR_INIT(_c) { \
(_c)->buc_magic = BU_COLOR_MAGIC; \
@@ -138,7 +138,6 @@ BU_EXPORT extern int bu_color_from_rgb_floats(struct bu_color *cp, fastf_t *rgb)
BU_EXPORT extern int bu_color_to_rgb_floats(struct bu_color *cp, fastf_t *rgb);
BU_EXPORT extern int bu_color_from_rgb_chars(struct bu_color *cp, unsigned char *rgb);
BU_EXPORT extern int bu_color_to_rgb_chars(struct bu_color *cp, unsigned char *rgb);
BU_EXPORT extern int bu_color_from_str(struct bu_color *cp, const char *str);
/* UNIMPLEMENTED
*
+6 -6
View File
@@ -146,13 +146,13 @@ typedef int (*bu_opt_arg_process_t)(struct bu_vls *msg, int argc, const char **a
* first argument of the argv array - this macro encapsulates that into a
* standard check.
*/
#define BU_OPT_CHECK_ARGV0(_msg, _argc, _argv, _opt_name) do {\
#define BU_OPT_CHECK_ARGV0(_msg, _argc, _argv, _opt_name) \
if ((_argc) < 1 || !(_argv) || !(_argv)[0] || (_argv)[0][0] == '\0') { \
if ((_msg)) { \
bu_vls_printf((_msg), "Error: missing required argument: %s\n", (_opt_name)); \
} \
return -1; \
} } while (0)
}
/**
* @brief
@@ -173,24 +173,24 @@ struct bu_opt_desc {
#define BU_OPT_DESC_NULL {NULL, NULL, NULL, NULL, NULL, NULL}
/** Macro for assigning values to bu_opt_desc array entries. */
#define BU_OPT(_desc, _so, _lo, _ahelp, _aprocess, _var, _help) do { \
#define BU_OPT(_desc, _so, _lo, _ahelp, _aprocess, _var, _help) { \
(_desc).shortopt = _so; \
(_desc).longopt = _lo; \
(_desc).arg_helpstr = _ahelp; \
(_desc).arg_process = _aprocess; \
(_desc).set_var = (void *)_var; \
(_desc).help_string = _help; \
} while (0)
}
/** Convenience macro for setting a bu_opt_desc struct to BU_OPT_DESC_NULL */
#define BU_OPT_NULL(_desc) do { \
#define BU_OPT_NULL(_desc) { \
(_desc).shortopt = NULL; \
(_desc).longopt = NULL; \
(_desc).arg_helpstr = NULL; \
(_desc).arg_process = NULL; \
(_desc).set_var = NULL; \
(_desc).help_string = NULL; \
} while (0)
}
/**
* Parse @p argv array using option descriptions.
+10 -17
View File
@@ -96,28 +96,21 @@ BU_EXPORT extern char *bu_dirname(const char *path);
* A libbu re-implementation of basename() for cross-platform
* compatibility.
*
* Given a string containing a hierarchically delimited path (e.g.,
* /path/to/file), determine the file name portion after the last path
* separator.
* Given a string containing a hierarchical path, return a dynamic
* string to the portion after the last path separator.
*
* This function is similar to most basename() BSD system function
* implementations; but that system function cannot be used due to
* significantly inconsistent behavior across platforms, particularly
* with respect to memory allocation and threading behavior.
* This function is similar if not identical to most basename() BSD
* system function implementations; but that system function cannot be
* used due to significantly inconsistent behavior across platforms.
*
* This function always recognizes paths separated by a '/' (i.e.,
* geometry paths) as well as whatever the native platform directory
* separator may be. It is assumed that all file and directory names
* in the path do not contain a path separator. That is, there is
* currently no support for escaped characters.
* in the path will not contain a path separator, even if escaped.
*
* It is the caller's responsibility to provide a basename buffer with
* enough memory for a string with length at least strlen(path) + 1
* (for terminating nul) characters as that is the maximum possible
* basename size. If the basename output argument is NULL, then a
* dynamic memory will be returned and the caller is responsible for
* releasing memory (via bu_free()), otherwise the caller-provided
* basename pointer is returned and managed by the caller accordingly.
* It is the caller's responsibility to allocate basename with
* enough memory to hold a string with length strlen(path), since
* that is the maximum possible size of bu_basename's output.
*
* Examples of strings returned:
*
@@ -136,7 +129,7 @@ BU_EXPORT extern char *bu_dirname(const char *path);
* /// | /
*
*/
BU_EXPORT extern char *bu_basename(const char *path, char *basename);
BU_EXPORT extern void bu_basename(char *basename, const char *path);
/**
* Normalize a path according to rules used for realpath, but
+5 -5
View File
@@ -1,4 +1,4 @@
/* R E D B L A C K . H
/* R B . H
* BRL-CAD
*
* Copyright (c) 2004-2016 United States Government as represented by
@@ -18,8 +18,8 @@
* information.
*/
#ifndef BU_REDBLACK_H
#define BU_REDBLACK_H
#ifndef BU_RB_H
#define BU_RB_H
#include "common.h"
@@ -64,7 +64,7 @@ __BEGIN_DECLS
* Algorithms."
*/
/** @{ */
/** @file bu/redblack.h */
/** @file bu/rb.h */
/**
@@ -530,7 +530,7 @@ BU_EXPORT extern void bu_rb_walk(struct bu_rb_tree *tree, int order, void (*visi
__END_DECLS
#endif /* BU_REDBLACK_H */
#endif /* BU_RB_H */
/*
* Local Variables:
+8 -9
View File
@@ -249,11 +249,10 @@ BU_EXPORT extern int bu_str_isprint(const char *cp);
* Returns truthfully if a given input string represents an
* "affirmative string".
*
* Input values that are case-insensitively NULL, empty, "n", "no",
* "false", "off", "(null)", or are 0-valued return as false. Any
* other input value return true. Strings strongly indicating true
* such as "y", "yes", "true", "on", or are 1-valued will return as 1,
* other strings still return as true but may be greater than 1.
* Input values that are null, empty, begin with the letter 'n', or
* are 0-valued return as false. Any other input value returns as
* true. Strings that strongly indicate true return as 1, other
* values still return as true but may be a value greater than 1.
*/
BU_EXPORT extern int bu_str_true(const char *str);
@@ -261,9 +260,9 @@ BU_EXPORT extern int bu_str_true(const char *str);
* Returns truthfully if a given input string represents a
* "negative string".
*
* Input values that are case-insensitively NULL, empty, "n", "no",
* "false", "off", "(null)", or are 0-valued return as true. Any
* other input value returns as false.
* Input values that are null, empty, begin with the letter 'n', or
* are 0-valued return as true. Any other input value returns as
* false.
*/
BU_EXPORT extern int bu_str_false(const char *str);
@@ -314,7 +313,7 @@ BU_EXPORT extern void bu_argv_free(size_t argc, char *argv[]);
* free up to argc elements of memory allocated to an array without
* free'ing the array itself.
*/
BU_EXPORT extern void bu_free_args(size_t argc, char *argv[], const char *str);
BU_EXPORT extern void bu_free_array(size_t argc, char *argv[], const char *str);
/**
* Dynamically duplicate an argv array and all elements in the array
+1 -11
View File
@@ -41,17 +41,7 @@ __BEGIN_DECLS
/** @file bu/time.h */
/**
* Returns a microsecond-accurate wall-clock time counter.
*
* Example use:
@code
int64_t start = bu_gettime();
do_some_work_here();
int64_t elapsed = bu_gettime() - start;
int seconds = elapsed / 1000000LL;
printf("time: %02d\n", seconds);
@endcode
*
* Return microsecond accuracy time information.
*/
BU_EXPORT extern int64_t bu_gettime(void);
+2 -2
View File
@@ -42,11 +42,11 @@ __BEGIN_DECLS
* Create a UUID (a 128-bit identifier) that conforms with RFC4122,
* version 4 or 5, in big endian network order. Version 4 UUIDs are
* suitable for a random object identifier (with 122 bits of random
* entropy). Providing a byte array and namespace will create a (SHA1-based)
* entropy). Providing a byte array will create a (SHA1-based)
* version 5 UUID suitable for repeatable identifier hashing.
*/
int
bu_uuid_create(uint8_t uuid[STATIC_ARRAY(16)], size_t nbytes, const uint8_t *bytes, const uint8_t namespace_uuid[STATIC_ARRAY(16)]);
bu_uuid_create(uint8_t uuid[STATIC_ARRAY(16)], size_t nbytes, uint8_t *bytes);
/**
* This is a convenience UUID comparison routine compatible with
+1 -1
View File
@@ -427,7 +427,7 @@ BU_EXPORT extern void bu_vls_vprintf(struct bu_vls *vls,
* a subset of characters that must be escaped or otherwise identified.
*
* Given the large set of possible scenarios, it definitely makes sense
* to allow an encoding specifying variable, and probably other optional
* to allow an encoding specifiying variable, and probably other optional
* variables (which may be NULL, depending on the encoding type) specifying
* active characters (that need quoting) and an escape character (or
* characters? does it take more than one in some scenarios? perhaps start
+11 -12
View File
@@ -325,6 +325,16 @@ typedef ptrdiff_t ssize_t;
# define __STDC_VERSION__ 0
#endif
/**
* Provide macros to indicate availability of diagnostic pragmas for
* GCC and Clang.
*/
#define HAVE_GCC_DIAG_PRAGMAS \
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined(__clang__))
#define HAVE_CLANG_DIAG_PRAGMAS \
(defined(__clang__) && (__clang_major__ > 2 || (__clang_major__ == 2 && __clang_minor__ >= 8)))
/**
* globally disable certain warnings. do NOT add new warnings here
* without discussion and research. only warnings that cannot be
@@ -427,18 +437,7 @@ typedef ptrdiff_t ssize_t;
* CPP_XSTR(CPP_XGLUE(abc, 123)) => "123123"
*/
#ifndef CPP_XGLUE
# define CPP_XGLUE(a, b) CPP_GLUE(a, b)
#endif
/**
* Provide format specifier string tied to a size (e.g., "%123s")
*
* #define STR_LEN 10+1
* char str[STR_LEN] = {0};
* scanf(CPP_SCANSIZE(STR_LEN) "\n", str);
*/
#ifndef CPP_SCAN
# define CPP_SCAN(sz) "%" CPP_XSTR(sz) "s"
# define CPP_XGLUE(a, b) CPP_GLUE
#endif
/**
+1 -2
View File
@@ -344,7 +344,6 @@ DM_EXPORT extern unsigned char *dm_get_bg(dm *dmp);
DM_EXPORT extern int dm_set_bg(dm *dmp, unsigned char r, unsigned char g, unsigned char b);
DM_EXPORT extern unsigned char *dm_get_fg(dm *dmp);
DM_EXPORT extern int dm_set_fg(dm *dmp, unsigned char r, unsigned char g, unsigned char b, int strict, fastf_t transparency);
DM_EXPORT extern int dm_reshape(dm *dmp, int width, int height);
DM_EXPORT extern int dm_make_current(dm *dmp);
DM_EXPORT extern vect_t *dm_get_clipmin(dm *dmp);
DM_EXPORT extern vect_t *dm_get_clipmax(dm *dmp);
@@ -378,7 +377,7 @@ DM_EXPORT extern void dm_set_perspective(dm *dmp, fastf_t perspective);
DM_EXPORT extern int dm_get_display_image(dm *dmp, unsigned char **image);
DM_EXPORT extern int dm_gen_dlists(dm *dmp, size_t range);
DM_EXPORT extern int dm_begin_dlist(dm *dmp, unsigned int list);
DM_EXPORT extern int dm_draw_dlist(dm *dmp, unsigned int list);
DM_EXPORT extern void dm_draw_dlist(dm *dmp, unsigned int list);
DM_EXPORT extern int dm_end_dlist(dm *dmp);
DM_EXPORT extern int dm_free_dlists(dm *dmp, unsigned int list, int range);
DM_EXPORT extern int dm_draw_vlist(dm *dmp, struct bn_vlist *vp);
-1
View File
@@ -157,7 +157,6 @@ FB_EXPORT extern int fb_common_image_size(size_t *widthp, size_t *heightp, size_
FB_EXPORT extern int fb_common_name_size(size_t *widthp, size_t *heightp, const char *name);
FB_EXPORT extern int fb_write_fp(fb *ifp, FILE *fp, int req_width, int req_height, int crunch, int inverse, struct bu_vls *result);
FB_EXPORT extern int fb_read_fd(fb *ifp, int fd, int file_width, int file_height, int file_xoff, int file_yoff, int scr_width, int scr_height, int scr_xoff, int scr_yoff, int fileinput, char *file_name, int one_line_only, int multiple_lines, int autosize, int inverse, int clear, int zoom, struct bu_vls *result);
FB_EXPORT extern int fb_read_png(fb *ifp, FILE *fp, int file_xoff, int file_yoff, int scr_xoff, int scr_yoff, int clear, int zoom, int inverse, int one_line_only, int multiple_lines, int verbose, int header_only, double def_screen_gamma, struct bu_vls *result);
FB_EXPORT extern void fb_set_interface(fb *ifp, const char *interface_type);
FB_EXPORT extern void fb_set_name(fb *ifp, const char *name);
+6 -3
View File
@@ -117,9 +117,12 @@ struct ged_run_rt {
HANDLE fd;
HANDLE hProcess;
DWORD pid;
void *chan; /* FIXME: uses communication channel instead of file
* descriptor to get output from rt.
*/
# ifdef TCL_OK
Tcl_Channel chan;
# else
void *chan;
# endif
#else
int fd;
int pid;
-5
View File
@@ -71,11 +71,6 @@ GED_EXPORT extern int ged_fbclear(struct ged *gedp, int argc, const char *argv[]
*/
GED_EXPORT extern int ged_pix2fb(struct ged *gedp, int argc, const char *argv[]);
/**
* Png2fb reads a png file into a framebuffer.
*/
GED_EXPORT extern int ged_png2fb(struct ged *gedp, int argc, const char *argv[]);
__END_DECLS
+4 -1
View File
@@ -117,8 +117,11 @@ GED_EXPORT extern int ged_ps(struct ged *gedp, int argc, const char *argv[]);
/**
* Returns the solid table & vector list as a string
*
* @todo - there's no way this function should be limited to the
* documented purpose above...
*/
GED_EXPORT extern int ged_solid_report(struct ged *gedp, int argc, const char *argv[]);
GED_EXPORT extern int ged_report(struct ged *gedp, int argc, const char *argv[]);
/**
* Save the view
-2
View File
@@ -29,8 +29,6 @@
#ifndef PKG_H
#define PKG_H
#include "common.h"
/* for size_t */
#include <stddef.h>
+1 -1
View File
@@ -73,7 +73,7 @@
* include stdint.h. The hope is that one or the other can be
* used with no real difference.
*
* 5) In the current version, if your platform can't represent
* 5) In the current verison, if your platform can't represent
* int32_t, int16_t and int8_t, it just dumps out with a compiler
* error.
*
-4
View File
@@ -30,10 +30,6 @@
__BEGIN_DECLS
struct rt_comb_internal; /* forward declaration */
/* db5_attr.c */
/**
* Define standard attribute types in BRL-CAD geometry. (See the
-1
View File
@@ -22,7 +22,6 @@
#define RT_DB_FULLPATH_H
#include "common.h"
#include "bu/vls.h"
#include "rt/defines.h"
__BEGIN_DECLS
-1
View File
@@ -29,7 +29,6 @@
#include "bu/avs.h"
#include "bn/mat.h"
#include "rt/defines.h"
#include "rt/resource.h"
__BEGIN_DECLS
-6
View File
@@ -26,16 +26,10 @@
#include "common.h"
#include "vmath.h"
#include "bu/avs.h"
#include "rt/db5.h"
#include "rt/defines.h"
__BEGIN_DECLS
struct rt_db_internal; /* forward declaration */
/* db_open.c */
/**
* Ensure that the on-disk database has been completely written out of
-5
View File
@@ -177,11 +177,6 @@ RT_EXPORT extern int rt_obj_params(struct pc_pc_set *ps, const struct rt_db_inte
*/
RT_EXPORT extern int rt_obj_mirror(struct rt_db_internal *ip, const plane_t *plane);
/**
* if `stp` is prepped, serialize; otherwise, deserialize from `external`
*/
RT_EXPORT extern int rt_obj_prep_serialize(struct soltab *stp, const struct rt_db_internal *ip, struct bu_external *external, uint32_t *version);
__END_DECLS
#endif /* RT_FUNC_H */
+73 -75
View File
@@ -73,46 +73,46 @@ struct rt_functab {
int ft_use_rpp;
int (*ft_prep)(struct soltab *stp,
struct rt_db_internal *ip,
struct rt_i *rtip);
struct rt_db_internal *ip,
struct rt_i *rtip);
#define RTFUNCTAB_FUNC_PREP_CAST(_func) ((int (*)(struct soltab *, struct rt_db_internal *, struct rt_i *))_func)
int (*ft_shot)(struct soltab *stp,
struct xray *rp,
struct application *ap, /* has resource */
struct seg *seghead);
struct xray *rp,
struct application *ap, /* has resource */
struct seg *seghead);
#define RTFUNCTAB_FUNC_SHOT_CAST(_func) ((int (*)(struct soltab *, struct xray *, struct application *, struct seg *))_func)
void (*ft_print)(const struct soltab *stp);
#define RTFUNCTAB_FUNC_PRINT_CAST(_func) ((void (*)(const struct soltab *))_func)
void (*ft_norm)(struct hit *hitp,
struct soltab *stp,
struct xray *rp);
struct soltab *stp,
struct xray *rp);
#define RTFUNCTAB_FUNC_NORM_CAST(_func) ((void (*)(struct hit *, struct soltab *, struct xray *))_func)
int (*ft_piece_shot)(struct rt_piecestate *psp,
struct rt_piecelist *plp,
double dist, /* correction to apply to hit distances */
struct xray *ray, /* ray transformed to be near cut cell */
struct application *ap, /* has resource */
struct seg *seghead); /* used only for PLATE mode hits */
struct rt_piecelist *plp,
double dist, /* correction to apply to hit distances */
struct xray *ray, /* ray transformed to be near cut cell */
struct application *ap, /* has resource */
struct seg *seghead); /* used only for PLATE mode hits */
#define RTFUNCTAB_FUNC_PIECE_SHOT_CAST(_func) ((int (*)(struct rt_piecestate *, struct rt_piecelist *, double dist, struct xray *, struct application *, struct seg *))_func)
void (*ft_piece_hitsegs)(struct rt_piecestate *psp,
struct seg *seghead,
struct application *ap); /* has resource */
struct seg *seghead,
struct application *ap); /* has resource */
#define RTFUNCTAB_FUNC_PIECE_HITSEGS_CAST(_func) ((void (*)(struct rt_piecestate *, struct seg *, struct application *))_func)
void (*ft_uv)(struct application *ap, /* has resource */
struct soltab *stp,
struct hit *hitp,
struct uvcoord *uvp);
struct soltab *stp,
struct hit *hitp,
struct uvcoord *uvp);
#define RTFUNCTAB_FUNC_UV_CAST(_func) ((void (*)(struct application *, struct soltab *, struct hit *, struct uvcoord *))_func)
void (*ft_curve)(struct curvature *cvp,
struct hit *hitp,
struct soltab *stp);
struct hit *hitp,
struct soltab *stp);
#define RTFUNCTAB_FUNC_CURVE_CAST(_func) ((void (*)(struct curvature *, struct hit *, struct soltab *))_func)
int (*ft_classify)(const struct soltab * /*stp*/, const vect_t /*min*/, const vect_t /*max*/, const struct bn_tol * /*tol*/);
@@ -122,83 +122,83 @@ struct rt_functab {
#define RTFUNCTAB_FUNC_FREE_CAST(_func) ((void (*)(struct soltab *))_func)
int (*ft_plot)(struct bu_list * /*vhead*/,
struct rt_db_internal * /*ip*/,
const struct rt_tess_tol * /*ttol*/,
const struct bn_tol * /*tol*/,
const struct rt_view_info * /*view info*/);
struct rt_db_internal * /*ip*/,
const struct rt_tess_tol * /*ttol*/,
const struct bn_tol * /*tol*/,
const struct rt_view_info * /*view info*/);
#define RTFUNCTAB_FUNC_PLOT_CAST(_func) ((int (*)(struct bu_list *, struct rt_db_internal *, const struct rt_tess_tol *, const struct bn_tol *, const struct rt_view_info *))_func)
int (*ft_adaptive_plot)(struct rt_db_internal * /*ip*/,
const struct rt_view_info * /*view info*/);
const struct rt_view_info * /*view info*/);
#define RTFUNCTAB_FUNC_ADAPTIVE_PLOT_CAST(_func) ((int (*)(struct rt_db_internal *, const struct rt_view_info *))_func)
void (*ft_vshot)(struct soltab * /*stp*/[],
struct xray *[] /*rp*/,
struct seg * /*segp*/,
int /*n*/,
struct application * /*ap*/);
struct xray *[] /*rp*/,
struct seg * /*segp*/,
int /*n*/,
struct application * /*ap*/);
#define RTFUNCTAB_FUNC_VSHOT_CAST(_func) ((void (*)(struct soltab *[], struct xray *[], struct seg *, int, struct application *))_func)
int (*ft_tessellate)(struct nmgregion ** /*r*/,
struct model * /*m*/,
struct rt_db_internal * /*ip*/,
const struct rt_tess_tol * /*ttol*/,
const struct bn_tol * /*tol*/);
struct model * /*m*/,
struct rt_db_internal * /*ip*/,
const struct rt_tess_tol * /*ttol*/,
const struct bn_tol * /*tol*/);
#define RTFUNCTAB_FUNC_TESS_CAST(_func) ((int (*)(struct nmgregion **, struct model *, struct rt_db_internal *, const struct rt_tess_tol *, const struct bn_tol *))_func)
int (*ft_tnurb)(struct nmgregion ** /*r*/,
struct model * /*m*/,
struct rt_db_internal * /*ip*/,
const struct bn_tol * /*tol*/);
struct model * /*m*/,
struct rt_db_internal * /*ip*/,
const struct bn_tol * /*tol*/);
#define RTFUNCTAB_FUNC_TNURB_CAST(_func) ((int (*)(struct nmgregion **, struct model *, struct rt_db_internal *, const struct bn_tol *))_func)
void (*ft_brep)(ON_Brep ** /*b*/,
struct rt_db_internal * /*ip*/,
const struct bn_tol * /*tol*/);
struct rt_db_internal * /*ip*/,
const struct bn_tol * /*tol*/);
#define RTFUNCTAB_FUNC_BREP_CAST(_func) ((void (*)(ON_Brep **, struct rt_db_internal *, const struct bn_tol *))_func)
int (*ft_import5)(struct rt_db_internal * /*ip*/,
const struct bu_external * /*ep*/,
const mat_t /*mat*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
const struct bu_external * /*ep*/,
const mat_t /*mat*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
#define RTFUNCTAB_FUNC_IMPORT5_CAST(_func) ((int (*)(struct rt_db_internal *, const struct bu_external *, const mat_t, const struct db_i *, struct resource *))_func)
int (*ft_export5)(struct bu_external * /*ep*/,
const struct rt_db_internal * /*ip*/,
double /*local2mm*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
const struct rt_db_internal * /*ip*/,
double /*local2mm*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
#define RTFUNCTAB_FUNC_EXPORT5_CAST(_func) ((int (*)(struct bu_external *, const struct rt_db_internal *, double, const struct db_i *, struct resource *))_func)
int (*ft_import4)(struct rt_db_internal * /*ip*/,
const struct bu_external * /*ep*/,
const mat_t /*mat*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
const struct bu_external * /*ep*/,
const mat_t /*mat*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
#define RTFUNCTAB_FUNC_IMPORT4_CAST(_func) ((int (*)(struct rt_db_internal *, const struct bu_external *, const mat_t, const struct db_i *, struct resource *))_func)
int (*ft_export4)(struct bu_external * /*ep*/,
const struct rt_db_internal * /*ip*/,
double /*local2mm*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
const struct rt_db_internal * /*ip*/,
double /*local2mm*/,
const struct db_i * /*dbip*/,
struct resource * /*resp*/);
#define RTFUNCTAB_FUNC_EXPORT4_CAST(_func) ((int (*)(struct bu_external *, const struct rt_db_internal *, double, const struct db_i *, struct resource *))_func)
void (*ft_ifree)(struct rt_db_internal * /*ip*/);
#define RTFUNCTAB_FUNC_IFREE_CAST(_func) ((void (*)(struct rt_db_internal *))_func)
int (*ft_describe)(struct bu_vls * /*str*/,
const struct rt_db_internal * /*ip*/,
int /*verbose*/,
double /*mm2local*/,
struct resource * /*resp*/,
struct db_i *);
const struct rt_db_internal * /*ip*/,
int /*verbose*/,
double /*mm2local*/,
struct resource * /*resp*/,
struct db_i *);
#define RTFUNCTAB_FUNC_DESCRIBE_CAST(_func) ((int (*)(struct bu_vls *, const struct rt_db_internal *, int, double, struct resource *, struct db_i *))_func)
int (*ft_xform)(struct rt_db_internal * /*op*/,
const mat_t /*mat*/, struct rt_db_internal * /*ip*/,
int /*free*/, struct db_i * /*dbip*/,
struct resource * /*resp*/);
const mat_t /*mat*/, struct rt_db_internal * /*ip*/,
int /*free*/, struct db_i * /*dbip*/,
struct resource * /*resp*/);
#define RTFUNCTAB_FUNC_XFORM_CAST(_func) ((int (*)(struct rt_db_internal *, const mat_t, struct rt_db_internal *, int, struct db_i *, struct resource *))_func)
const struct bu_structparse *ft_parsetab; /**< @brief rt_xxx_parse */
@@ -222,9 +222,9 @@ struct rt_functab {
/* Axis aligned bounding box */
int (*ft_bbox)(struct rt_db_internal * /*ip*/,
point_t * /*min X, Y, Z of bounding RPP*/,
point_t * /*max X, Y, Z of bounding RPP*/,
const struct bn_tol *);
point_t * /*min X, Y, Z of bounding RPP*/,
point_t * /*max X, Y, Z of bounding RPP*/,
const struct bn_tol *);
#define RTFUNCTAB_FUNC_BBOX_CAST(_func) ((int (*)(struct rt_db_internal *, point_t *, point_t *, const struct bn_tol *))_func)
void (*ft_volume)(fastf_t * /*vol*/, const struct rt_db_internal * /*ip*/);
@@ -237,33 +237,31 @@ struct rt_functab {
#define RTFUNCTAB_FUNC_CENTROID_CAST(_func) ((void (*)(point_t *, const struct rt_db_internal *))_func)
int (*ft_oriented_bbox)(struct rt_arb_internal * /* bounding arb8 */,
struct rt_db_internal * /*ip*/,
const fastf_t);
struct rt_db_internal * /*ip*/,
const fastf_t);
#define RTFUNCTAB_FUNC_ORIENTED_BBOX_CAST(_func) ((int (*)(struct rt_arb_internal *, struct rt_db_internal *, const fastf_t))_func)
/** get a list of the selections matching a query */
struct rt_selection_set *(*ft_find_selections)(const struct rt_db_internal *,
const struct rt_selection_query *);
const struct rt_selection_query *);
#define RTFUNCTAB_FUNC_FIND_SELECTIONS_CAST(_func) ((struct rt_selection_set *(*)(const struct rt_db_internal *, const struct rt_selection_query *))_func)
/** evaluate a logical selection expression (e.g. a INTERSECT b,
* NOT a) to create a new selection
*/
struct rt_selection *(*ft_evaluate_selection)(const struct rt_db_internal *,
int op,
const struct rt_selection *,
const struct rt_selection *);
int op,
const struct rt_selection *,
const struct rt_selection *);
#define RTFUNCTAB_FUNC_EVALUATE_SELECTION_CAST(_func) ((struct rt_selection *(*)(const struct rt_db_internal *, int op, const struct rt_selection *, const struct rt_selection *))_func)
/** apply an operation to a selected subset of a primitive */
int (*ft_process_selection)(struct rt_db_internal *,
struct db_i *,
const struct rt_selection *,
const struct rt_selection_operation *);
struct db_i *,
const struct rt_selection *,
const struct rt_selection_operation *);
#define RTFUNCTAB_FUNC_PROCESS_SELECTION_CAST(_func) ((int (*)(struct rt_db_internal *, struct db_i *, const struct rt_selection *, const struct rt_selection_operation *))_func)
int (*ft_prep_serialize)(struct soltab *stp, const struct rt_db_internal *ip, struct bu_external *external, uint32_t *version);
#define RTFUNCTAB_FUNC_PREP_SERIALIZE_CAST(_func) ((int (*)(struct soltab *, const struct rt_db_internal *, struct bu_external *, uint32_t *))_func)
};
+33 -25
View File
@@ -31,6 +31,9 @@
__BEGIN_DECLS
#define TIE_SINGLE_PRECISION 0
#define TIE_DOUBLE_PRECISION 1
#ifndef RT_EXPORT
# if defined(RT_DLL_EXPORTS) && defined(RT_DLL_IMPORTS)
# error "Only RT_DLL_EXPORTS or RT_DLL_IMPORTS can be defined, not both."
@@ -45,11 +48,12 @@ __BEGIN_DECLS
/*
* define which precision to use, 0 is 'float' and 1 is 'double'.
* Default to double precision to protect those not familiar.
* Horrible macros wrap functions and values to build a library
* capable of doing either without recompilation.
*/
#ifndef TIE_PRECISION
# define TIE_PRECISION 1
# define TIE_PRECISION TIE_SINGLE_PRECISION
#endif
#define TIE_CHECK_DEGENERATE 1
@@ -58,14 +62,14 @@ __BEGIN_DECLS
#define TIE_KDTREE_OPTIMAL 0x1
/* Type to use for floating precision */
#if TIE_PRECISION == 0
typedef float TFLOAT;
# define TIE_VAL(x) CPP_GLUE(x, _single)
#elif TIE_PRECISION == 1
typedef double TFLOAT;
# define TIE_VAL(x) CPP_GLUE(x, _double)
#if TIE_PRECISION == TIE_SINGLE_PRECISION
typedef float tfloat;
# define TIE_VAL(x) x##0
#elif TIE_PRECISION == TIE_DOUBLE_PRECISION
typedef double tfloat;
# define TIE_VAL(x) x##1
#else
# error "Unknown precision"
# error "Unknown precision"
#endif
@@ -74,7 +78,7 @@ typedef double TFLOAT;
*(_t *)&((uint8_t *)_tv)[_ti] = *(_t *)&((uint8_t *)_fv)[_fi]; }
typedef struct TIE_3_s {
TFLOAT v[3]; /* 12-bytes or 24-bytes */
tfloat v[3]; /* 12-bytes or 24-bytes */
} TIE_3;
struct tie_ray_s {
@@ -99,7 +103,7 @@ struct tie_tri_s {
* Data[1] = Normal,
* Data[2] = DotProduct, VectorU, VectorV
*/
TFLOAT v[2]; /* 8-bytes or 16-bytes */
tfloat v[2]; /* 8-bytes or 16-bytes */
void *ptr; /* 4-bytes or 8-bytes */
uint32_t b; /* 4-bytes (way more than we need, but helps keep alignment) */
};
@@ -125,24 +129,28 @@ struct tie_s {
fastf_t radius;
};
RT_EXPORT extern int tie_check_degenerate;
RT_EXPORT extern void TIE_VAL(tie_kdtree_free)(struct tie_s *tie);
RT_EXPORT extern void TIE_VAL(tie_kdtree_prep)(struct tie_s *tie);
RT_EXPORT extern fastf_t TIE_PREC;
#define TIE_INIT TIE_VAL(tie_init)
#define TIE_FREE TIE_VAL(tie_free)
#define TIE_PREP TIE_VAL(tie_prep)
#define TIE_WORK TIE_VAL(tie_work)
#define TIE_PUSH TIE_VAL(tie_push)
#define TIE_KDTREE_PREP TIE_VAL(tie_kdtree_prep)
#define TIE_KDTREE_FREE TIE_VAL(tie_kdtree_free)
/* compatibility macros */
#define tie_kdtree_free TIE_VAL(tie_kdtree_free)
#define tie_kdtree_prep TIE_VAL(tie_kdtree_prep)
RT_EXPORT extern void TIE_INIT(struct tie_s *tie, unsigned int tri_num, unsigned int kdmethod);
RT_EXPORT extern void TIE_FREE(struct tie_s *tie);
RT_EXPORT extern void TIE_PREP(struct tie_s *tie);
RT_EXPORT extern void*TIE_WORK(struct tie_s *tie, struct tie_ray_s *ray, struct tie_id_s *id, void *(*hitfunc)(struct tie_ray_s*, struct tie_id_s*, struct tie_tri_s*, void *ptr), void *ptr);
RT_EXPORT extern void TIE_PUSH(struct tie_s *tie, TIE_3 **tlist, unsigned int tnum, void *plist, unsigned int pstride);
RT_EXPORT extern void TIE_KDTREE_FREE(struct tie_s *tie);
RT_EXPORT extern void TIE_KDTREE_PREP(struct tie_s *tie);
RT_EXPORT extern int tie_check_degenerate;
RT_EXPORT extern void TIE_VAL(tie_init)(struct tie_s *tie, unsigned int tri_num, unsigned int kdmethod);
RT_EXPORT extern void TIE_VAL(tie_free)(struct tie_s *tie);
RT_EXPORT extern void TIE_VAL(tie_prep)(struct tie_s *tie);
RT_EXPORT extern void* TIE_VAL(tie_work)(struct tie_s *tie, struct tie_ray_s *ray, struct tie_id_s *id, void *(*hitfunc)(struct tie_ray_s*, struct tie_id_s*, struct tie_tri_s*, void *ptr), void *ptr);
RT_EXPORT extern void TIE_VAL(tie_push)(struct tie_s *tie, TIE_3 **tlist, unsigned int tnum, void *plist, unsigned int pstride);
/* backwards compatible macros */
#define tie_init TIE_VAL(tie_init)
#define tie_free TIE_VAL(tie_free)
#define tie_prep TIE_VAL(tie_prep)
#define tie_work TIE_VAL(tie_work)
#define tie_push TIE_VAL(tie_push)
__END_DECLS
+2 -4
View File
@@ -46,10 +46,8 @@ if(CPACK_INSTALLED_DIRECTORIES)
endif(CPACK_GENERATOR MATCHES "ZIP" OR CPACK_GENERATOR MATCHES "TGZ" OR CPACK_GENERATOR MATCHES "TBZ2" )
endif(CPACK_INSTALLED_DIRECTORIES)
# Null out the install prefix, unless we're working on an RPM
if(NOT CPACK_GENERATOR MATCHES "RPM")
set(CPACK_PACKAGING_INSTALL_PREFIX "")
endif(NOT CPACK_GENERATOR MATCHES "RPM")
# Null out the install prefix regardless
set(CPACK_PACKAGING_INSTALL_PREFIX "")
# Local Variables:
# tab-width: 8
-1
View File
@@ -438,7 +438,6 @@ if(BRLCAD_EXTRADOCS)
set(DOCBOOK_FORMATS ${DOCBOOK_FORMATS} pdf)
endif(BRLCAD_EXTRADOCS_PDF)
if(DOCBOOK_FORMATS)
list(REMOVE_DUPLICATES DOCBOOK_FORMATS)
string(REPLACE ";" "/" DOCBOOK_FORMATS "${DOCBOOK_FORMATS}")
set(BRLCAD_DOCBOOK_BUILD "ON (${DOCBOOK_FORMATS})")
else(DOCBOOK_FORMATS)
+2 -2
View File
@@ -652,9 +652,9 @@ macro(BRLCAD_INCLUDE_DIRS DIR_LIST)
set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
endif(APPLE)
include_directories(AFTER SYSTEM ${inc_dir})
include_directories(SYSTEM ${inc_dir})
else("${inc_dir}" MATCHES "other" OR NOT IS_LOCAL)
include_directories(BEFORE ${inc_dir})
include_directories(${inc_dir})
endif("${inc_dir}" MATCHES "other" OR NOT IS_LOCAL)
endforeach(inc_dir ${ALL_INCLUDES})
+7 -9
View File
@@ -53,15 +53,13 @@
# Handle default exec and sanity checking for XML validation
if(BRLCAD_ENABLE_STRICT)
if(NOT DEFINED VALIDATE_EXECUTABLE)
set(VALIDATE_EXECUTABLE "xmllint")
else(NOT DEFINED VALIDATE_EXECUTABLE)
if(NOT EXISTS "${BRLCAD_SOURCE_DIR}/misc/CMake/${VALIDATE_EXECUTABLE}.cmake.in")
message(FATAL_ERROR "Specified ${VALIDATE_EXECUTABLE} for DocBook validation, but \"${BRLCAD_SOURCE_DIR}/misc/CMake/${VALIDATE_EXECUTABLE}.cmake.in\" does not exist. To use ${VALIDATE_EXECUTABLE} a ${VALIDATE_EXECUTABLE}.cmake.in file must be defined.")
endif(NOT EXISTS "${BRLCAD_SOURCE_DIR}/misc/CMake/${VALIDATE_EXECUTABLE}.cmake.in")
endif(NOT DEFINED VALIDATE_EXECUTABLE)
endif(BRLCAD_ENABLE_STRICT)
if(NOT DEFINED VALIDATE_EXECUTABLE)
set(VALIDATE_EXECUTABLE "xmllint")
else(NOT DEFINED VALIDATE_EXECUTABLE)
if(NOT EXISTS "${BRLCAD_SOURCE_DIR}/misc/CMake/${VALIDATE_EXECUTABLE}.cmake.in")
message(FATAL_ERROR "Specified ${VALIDATE_EXECUTABLE} for DocBook validation, but \"${BRLCAD_SOURCE_DIR}/misc/CMake/${VALIDATE_EXECUTABLE}.cmake.in\" does not exist. To use ${VALIDATE_EXECUTABLE} a ${VALIDATE_EXECUTABLE}.cmake.in file must be defined.")
endif(NOT EXISTS "${BRLCAD_SOURCE_DIR}/misc/CMake/${VALIDATE_EXECUTABLE}.cmake.in")
endif(NOT DEFINED VALIDATE_EXECUTABLE)
# Handle default exec and sanity checking for XSLT
if(NOT DEFINED XSLT_EXECUTABLE)
+6 -10
View File
@@ -37,12 +37,9 @@
#
# The following variables are set:
#
# OPENNURBS_INCLUDE_DIRS - where to find opennurbs.h, etc.
# OPENNURBS_LIBRARIES - List of libraries when using openNURBS
# OPENNURBS_FOUND - True if openNURBS found.
# OpenNURBS requires zlib
find_package(ZLIB)
# OPENNURBS_INCLUDE_DIRS - where to find zlib.h, etc.
# OPENNURBS_LIBRARIES - List of libraries when using zlib.
# OPENNURBS_FOUND - True if zlib found.
find_path(OPENNURBS_INCLUDE_DIR opennurbs.h)
find_library(OPENNURBS_LIBRARY NAMES opennurbs openNURBS OpenNURBS)
@@ -50,10 +47,9 @@ find_library(OPENNURBS_LIBRARY NAMES opennurbs openNURBS OpenNURBS)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENNURBS DEFAULT_MSG OPENNURBS_LIBRARY OPENNURBS_INCLUDE_DIR)
if(OPENNURBS_FOUND)
set(OPENNURBS_INCLUDE_DIRS ${OPENNURBS_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
list(REMOVE_DUPLICATES OPENNURBS_INCLUDE_DIR)
set(OPENNURBS_LIBRARIES ${OPENNURBS_LIBRARY} ${ZLIB_LIBRARY})
IF (OPENNURBS_FOUND)
set(OPENNURBS_INCLUDE_DIRS ${OPENNURBS_INCLUDE_DIR})
set(OPENNURBS_LIBRARIES ${OPENNURBS_LIBRARY})
endif()
# Local Variables:
# tab-width: 8
+2 -8
View File
@@ -36,18 +36,12 @@
# - Find xmllint executable
#
# The module defines the following variables:
# XMLLINT_FOUND - true is xmllint executable is found
# XMLLINT_EXECUTABLE - the path to the xmllint executable
# XSLTPROC_FOUND - true is xsltproc executable is found
# XSLTPROC_EXECUTABLE - the path to the xsltproc executable
find_program(XMLLINT_EXECUTABLE xmllint DOC "path to the xmllint executable")
mark_as_advanced(XMLLINT_EXECUTABLE)
if(NOT XMLLINT_EXECUTABLE)
set(XMLLINT_FOUND 0)
else(NOT XMLLINT_EXECUTABLE)
set(XMLLINT_FOUND 1)
endif(NOT XMLLINT_EXECUTABLE)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XMLLINT DEFAULT_MSG XMLLINT_EXECUTABLE)
+16 -34
View File
@@ -49,12 +49,6 @@ set(XSLTPROC_EXECUTABLE "@XSLTPROC_EXEC@")
set(XMLLINT_EXECUTABLE "@XMLLINT_EXEC@")
macro(XSLTPROC stylesheet filename outfile extras)
# If we're trying to do this but XSLTPROC_EXECUTABLE was unset somehow, fatal error
if ("${XSLTPROC_EXECUTABLE}" STREQUAL "")
message(FATAL_ERROR "xsltproc processing requested, but XSLTPROC_EXECUTABLE is not set.")
endif ("${XSLTPROC_EXECUTABLE}" STREQUAL "")
set(ENV{XML_DEBUG_CATALOG} 1)
# It is necessary to ensure that the target directory exists *before* calling xsltproc
# when building in parallel, due to a bug/limitation in xsltproc
@@ -95,38 +89,31 @@ get_filename_component(filename_root "${filename}" NAME_WE)
set(VE "@VALIDATE_EXECUTABLE@")
set(SCHEMA_DIR "@BRLCAD_BINARY_DIR@/doc/docbook/resources/other/docbook-schema")
if (NOT "${VE}" STREQUAL "")
if ("xmllint" MATCHES "${VE}")
if ("xmllint" MATCHES "${VE}")
if ("${XMLLINT_EXECUTABLE}" STREQUAL "")
message(FATAL_ERROR "Validation failure: xmllint validation requested, but XMLLINT_EXECUTABLE is not set.")
endif ("${XMLLINT_EXECUTABLE}" STREQUAL "")
execute_process(COMMAND "${XMLLINT_EXECUTABLE}" --xinclude --schema "${SCHEMA_DIR}/xsd/docbook.xsd" --noout --nonet "${filename}"
RESULT_VARIABLE CMDRESULT OUTPUT_VARIABLE CMDOUT ERROR_VARIABLE CMDERR)
execute_process(COMMAND "${XMLLINT_EXECUTABLE}" --xinclude --schema "${SCHEMA_DIR}/xsd/docbook.xsd" --noout --nonet "${filename}"
RESULT_VARIABLE CMDRESULT OUTPUT_VARIABLE CMDOUT ERROR_VARIABLE CMDERR)
elseif ("rnv" MATCHES "${VE}")
elseif ("rnv" MATCHES "${VE}")
execute_process(COMMAND rnv "${SCHEMA_DIR}/rng/docbookxi.rnc" "${filename}"
RESULT_VARIABLE CMDRESULT OUTPUT_VARIABLE CMDOUT ERROR_VARIABLE CMDERR)
execute_process(COMMAND rnv "${SCHEMA_DIR}/rng/docbookxi.rnc" "${filename}"
RESULT_VARIABLE CMDRESULT OUTPUT_VARIABLE CMDOUT ERROR_VARIABLE CMDERR)
elseif ("msv" MATCHES "${VE}")
elseif ("msv" MATCHES "${VE}")
execute_process(COMMAND msv -warning "${SCHEMA_DIR}/rng/docbookxi.rng" "@filename@"
RESULT_VARIABLE CMDRESULT OUTPUT_VARIABLE CMDOUT ERROR_VARIABLE CMDERR)
execute_process(COMMAND msv -warning "${SCHEMA_DIR}/rng/docbookxi.rng" "@filename@"
RESULT_VARIABLE CMDRESULT OUTPUT_VARIABLE CMDOUT ERROR_VARIABLE CMDERR)
else ("xmllint" MATCHES "${VE}")
else ("xmllint" MATCHES "${VE}")
message(FATAL_ERROR "Unsupported XML validator specified: ${VE}")
message(FATAL_ERROR "Unsupported XML validator specified: ${VE}")
endif("xmllint" MATCHES "${VE}")
endif("xmllint" MATCHES "${VE}")
# If we're not valid, we're done.
if(CMDRESULT)
message(FATAL_ERROR "${VE} validation failure on file ${filename}: ${CMDRESULT}\n${CMDOUT}\n${CMDERR}")
endif(CMDRESULT)
endif (NOT "${VE}" STREQUAL "")
# If we're not valid, we're done.
if(CMDRESULT)
message(FATAL_ERROR "${VE} validation failure on file ${filename}: ${CMDRESULT}\n${CMDOUT}\n${CMDERR}")
endif(CMDRESULT)
# Reset result variables.
set(CMDRESULT)
@@ -218,11 +205,6 @@ foreach(fmt ${CURRENT_OUTPUT_FORMATS})
get_filename_component(output_dir "${PDF_OUTFILE}" PATH)
execute_process(COMMAND "@CMAKE_COMMAND@" -E make_directory "${output_dir}")
# If we're trying to do this but APACHE_FOP was unset somehow, fatal error
if ("${APACHE_FOP}" STREQUAL "")
message(FATAL_ERROR "Apache FOP processing requested, but APACHE_FOP is not set.")
endif ("${APACHE_FOP}" STREQUAL "")
# Run FOP to actually generate the PDF
execute_process(COMMAND "@APACHE_FOP@" -c "@CMAKE_BINARY_DIR@/doc/docbook/fop.xconf" "${fo_outfile}" -pdf "${PDF_OUTFILE}" RESULT_VARIABLE CMDRESULT)
+5
View File
@@ -1,4 +1,9 @@
#include "common.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "bio.h"
int main(void) {
-1
View File
@@ -73,7 +73,6 @@ set(misc_ignore_files
batch-indent-region.el
brlcad-config.in
brlcad.spec.in
d-bindings
debian
flawfinder
jove.emacs
+1 -1
View File
@@ -7,7 +7,7 @@ add_definitions(
include_directories(
${BRLCAD_SOURCE_DIR}/include
${BRLCAD_SOURCE_DIR}/src/librt
${OPENNURBS_INCLUDE_DIRS}
${OPENNURBS_INCLUDE_DIR}
${BU_INCLUDE_DIRS}
${RT_INCLUDE_DIRS}
)
+2 -4
View File
@@ -1,10 +1,8 @@
Uses the svn2git code from: https://github.com/svn-all-fast-export/svn2git or build the local copy in misc/svn2git/svn2git
Uses the svn2git code from: https://www.gitorious.org/svn2git or build the local copy in misc/svn2git/svn2git
rsync -av svn.code.sf.net::p/brlcad/code .
./svn-all-fast-export --add-metadata-notes --identity-map account-map --rules rules code
TODO: investigate --svn-branches flag - do we want to use it?
./svn2git/svn-all-fast-export --add-metadata-notes --identity-map account-map --rules rules code
For tags, if you've used the supplied rules file, follow this post's approach:
http://blog.smartbear.com/software-quality/migrating-from-subversion-to-git-lessons-learned/
+5 -17
View File
@@ -1,7 +1,6 @@
Abhi2011 Abhijit Nandy <abhi2001@brlcad.org>
abhi2011 Abhijit Nandy <abhi2001@brlcad.org>
adam Adam Ross <adam@brlcad.org>
agkphysics Aaron Keesing <agkphysics@brlcad.org>
andrecastelo André Castelo <andrecastelo@brlcad.org>
anrgmrty Anurag Murty <anrgmrty@brlcad.org>
bharder Brad Harder <bharder@brlcad.org>
@@ -20,10 +19,8 @@ d_rossberg Daniel Rossberg <d_rossberg@brlcad.org>
davidloman David Loman <davidloman@brlcad.org>
ddreeves70 David Reeves <dreeves@brlcad.org>
dgodbey David Godbey <dgodbey@brlcad.org>
dhoward Doug Howard <dhoward@brlcad.org>
dpk Douglas Kingston <dpk@brlcad.org>
dtremenak Daniel Remenak <dtremenak@brlcad.org>
ebautu Elena Bautu <ebautu@brlcad.org>
ejno Jonathan Engbert <ejno@brlcad.org>
erikg Erik Greenwald <erikg@brlcad.org>
erikgreenwald Erik Greenwald <erikg@brlcad.org>
@@ -32,10 +29,10 @@ gdurf Glenn Durfee <gdurfee@brlcad.org>
gwyn Douglas Gwyn <gwyn@brlcad.org>
hartley Robert Hartley <hartley@vt.edu>
homovulgaris Dawn Thomas <homovulgaris@brlcad.org>
iiizzzaaakkk Isacc Kamga <iiizzzaaakkk@brlcad.org>
iiizzzaaakkk
indianlarry Keith Boman <wkboman@brlcad.org>
irpguardian Stephen Kennedy <irpguardian@brlcad.org>
jdoliner Joe Doliner <jdoliner@brlcad.org>
jdoliner
jehunt Jim Hunt <jhunt@ara.com>
jgrosh John Grosh <jgrosh@brlcad.org>
jimhunt Jim Hunt <jhunt@ara.com>
@@ -45,53 +42,44 @@ joevalleyfield Timothy Myers <joevalleyfield@brlcad.org>
johnranderson John Anderson <jra@brlcad.org>
jordisayol Jordi Sayol <jordisayol@brlcad.org>
jra John Anderson <jra@brlcad.org>
j-schulte Johannes Schulte <j-schulte@brlcad.org>
justin Justin Shumaker <twingy@brlcad.org>
kermit Charles Kennedy <kermit@brlcad.org>
kunigami Guilherme Kunigami <kunigami@brlcad.org>
lbutler Lee Butler <butler@brlcad.org>
louipc Loui Chang <louipc@brlcad.org>
mafm Manuel Montecelo <mafm@brlcad.org>
maths22 Jacob Burroughs <maths22@brlcad.org>
mccarty Cormac McCarty <mccarty@brlcad.org>
mendesr Roger Mendes <mendesr@brlcad.org>
merritt Don Merritt <merritt@brlcad.org>
mgillich Michael Gillich <mgillich@brlcad.org>
mike Michael John Muuss <mike@BMD70>
mjgillich Michael Gillich <mgillich@brlcad.org>
mm Michael Markowski <mm@brlcad.org>
mmark Michael Markowski <mm@brlcad.org>
mohitdaga Mohit Daga <zero_level@brlcad.org>
mohitdaga
morrison Christopher Sean Morrison <morrison@brlcad.org>
moss Gary Moss <moss@brlcad.org>
n_reed Nicholas Reed <n_reed@brlcad.org>
pacman87 Timothy Van Ruitenbeek <pacman87@brlcad.org>
peter-sa Peter Amidon <andromeda_galaxy@brlcad.org>
phil Phillip Dykstra <phil@brlcad.org>
phoenixyjll Wu Jianbang <phoenixyjll@brlcad.org>
pjt Paul Tanenbaum <pjt@brlcad.org>
poolio Ben Poole <poolio@brlcad.org>
popescuandrei Andrei-Constantin Popescu <popescuandrei@brlcad.org>
popescuandrei
prasad_silva Prasad Prometheus Silva <prasad_silva@brlcad.org>
r_weiss Richard Weiss <r_weiss@brlcad.org>
ralith Benjamin Saunders <ralith@brlcad.org>
ralith
rbowers Ronald Bowers <rbowers@brlcad.org>
reschly Robert Reschly <bob_reschly@brlcad.org>
ronaldbowers Ronald Bowers <rbowers@brlcad.org>
root
sammy Samuel Hocevar <sammy@brlcad.org>
scoates Susan Coates <scoates@brlcad.org>
starseeker Clifford Yapp <starseeker@brlcad.org>
stay Paul Stay <pstay@brlcad.org>
stefanmirea Stefan Mirea <stefanmirea@brlcad.org>
steveb Stephen Buckley <steveb@brlcad.org>
sue Susanne Muuss <sue@brlcad.org>
tbrowder2 Thomas Browder <tbrowder@brlcad.org>
tcs Terry Slattery <tcs@brlcad.org>
tossup
tranese TraNese Christy <tranese@brlcad.org>
twingy Justin Shumaker <twingy@brlcad.org>
vasco_costa Vasco Alexandre da Silva Costa <vasco_costa@brlcad.org>
vladbogo Vlad Bogolin <vladbobo@brlcad.org>
wm William Mermagen <wm@brlcad.org>
zhaoanqing Zhao Anqing <zhaoanqing@brlcad.org>
-4
View File
@@ -10,15 +10,11 @@ branches=(
"brlcad_5_1_alpha_patch"
"bullet"
"cmake"
"d-binding"
"dmtogl"
"dm-work"
"embree"
"framebuffer-experiment"
"gct"
"gecode"
"goblin"
"libnmg"
"libpng"
"nurbs"
"opencl"
@@ -1,8 +1,8 @@
# - Try to find subversion libraries
#
# This macro uses the following variables as preference for seraching the
# This macro uses the following variables as preference for searching the
# headers and includes:
# SUBVERSION_INSTALL_PATH - root directory where subversion is installed (ususally /usr)
# SUBVERSION_INSTALL_PATH - root directory where subversion is installed (usually /usr)
# APR_CONFIG_PATH - path where apr-config or apr-1-config are located
# APU_CONFIG_PATH - path where apu-config or apu-1-config are located
#
@@ -10,13 +10,6 @@
# SUBVERSION_FOUND - system has subversion libraries
# SUBVERSION_INCLUDE_DIRS - the include directories to link to subversion
# SUBVERSION_LIBRARIES - The libraries needed to link to subversion
# Copyright (c) 2009 Lambert CLARA <lambert.clara@yahoo.fr>
# Copyright (c) 2009 Bernhard Rosenkraenzer <ber@arklinux.org>
# Copyright (c) 2007-2009 Andreas Pakulat <apaku@gmx.de>
#
# Redistribution AND use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
IF(SUBVERSION_INCLUDE_DIRS AND SUBVERSION_LIBRARIES)
# Already in cache, be silent
@@ -97,7 +90,7 @@ IF (NOT WIN32)
ENDIF(${_ARG} MATCHES "^-l")
ENDFOREACH(_ARG)
ENDIF(NOT APR_CONFIG)
IF(NOT APU_CONFIG)
MESSAGE(STATUS "no apu-config found, subversion support will be disabled")
SET(SUBVERSION_FOUND false)
@@ -125,22 +118,22 @@ IF (NOT WIN32)
ENDFOREACH(_ARG)
ENDIF(NOT APU_CONFIG)
ELSE (NOT WIN32)
#search libaries for Windows
#search libraries for Windows
#this needs more work
# search for pathes
# search for paths
MACRO(FIND_SUB_INC targetvar libname pathadd)
IF (SUBVERSION_INSTALL_PATH)
FIND_PATH(${targetvar} ${libname}
PATHS
${SUBVERSION_INSTALL_PATH}/include${pathadd}
"$ENV{ProgramFiles}/Subversion/include${pathadd}"
"$ENV{ProgramFiles}/Subversion/include"${pathadd}
)
ELSE(SUBVERSION_INSTALL_PATH)
FIND_LIBRARY(${targetvar} ${libname}
PATHS
"$ENV{ProgramFiles}/Subversion/include${pathadd}"
"$ENV{ProgramFiles}/Subversion/include"${pathadd}
)
ENDIF(SUBVERSION_INSTALL_PATH)
ENDMACRO(FIND_SUB_INC)
@@ -150,12 +143,12 @@ ELSE (NOT WIN32)
FIND_LIBRARY(${targetvar} ${libname}
PATHS
${SUBVERSION_INSTALL_PATH}/lib
"$ENV{ProgramFiles}/Subversion/lib"
"$ENV{ProgramFiles}/Subversion/lib
)
ELSE(SUBVERSION_INSTALL_PATH)
FIND_LIBRARY(${targetvar} ${libname}
PATHS
"$ENV{ProgramFiles}/Subversion/lib"
"$ENV{ProgramFiles}/Subversion/lib
)
ENDIF(SUBVERSION_INSTALL_PATH)
ENDMACRO(FIND_SUB_LIB)
@@ -461,3 +454,4 @@ MARK_AS_ADVANCED(
#kate: space-indent on; indent-width 2; tab-width: 2; replace-tabs on; auto-insert-doxygen on
-30
View File
@@ -21,36 +21,6 @@ include_directories(
${APR_INCLUDE_DIRS}
)
include(CheckFunctionExists)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_INCLUDES ${SUBVERSION_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${SUBVERSION_LIBRARIES})
check_function_exists(svn_repos_open3 HAVE_SVN_REPOS_OPEN3)
if(NOT HAVE_SVN_REPOS_OPEN3)
check_function_exists(svn_repos_open HAVE_SVN_REPOS_OPEN)
if(HAVE_SVN_REPOS_OPEN)
add_definitions(-DUSE_SVN_REPOS_OPEN=1)
add_definitions(-Wno-deprecated-declarations)
endif(HAVE_SVN_REPOS_OPEN)
endif(NOT HAVE_SVN_REPOS_OPEN3)
check_function_exists(svn_stream_read_full HAVE_SVN_STREAM_READ_FULL)
if(NOT HAVE_SVN_STREAM_READ_FULL)
check_function_exists(svn_stream_read HAVE_SVN_STREAM_READ)
if(HAVE_SVN_STREAM_READ)
add_definitions(-DUSE_SVN_STREAM_READ=1)
add_definitions(-Wno-deprecated-declarations)
endif(HAVE_SVN_STREAM_READ)
endif(NOT HAVE_SVN_STREAM_READ_FULL)
check_function_exists(svn_stream_copy3 HAVE_SVN_STREAM_COPY3)
if(NOT HAVE_SVN_STREAM_COPY3)
check_function_exists(svn_stream_copy HAVE_SVN_STREAM_COPY)
if(HAVE_SVN_STREAM_COPY)
add_definitions(-DUSE_SVN_STRAM_COPY=1)
add_definitions(-Wno-deprecated-declarations)
endif(HAVE_SVN_STREAM_COPY)
endif(NOT HAVE_SVN_STREAM_COPY3)
cmake_pop_check_state()
set(SVN2GIT_SRCS
ruleparser.cpp
repository.cpp
+1 -6
View File
@@ -130,20 +130,15 @@ static const CommandLineOption options[] = {
{"--identity-domain DOMAIN", "provide user domain if no map was given"},
{"--revisions-file FILENAME", "provide a file with revision number that should be processed"},
{"--rules FILENAME[,FILENAME]", "the rules file(s) that determines what goes where"},
{"--msg-filter FILENAME", "External program / script to modify svn log message"},
{"--add-metadata", "if passed, each git commit will have svn commit info"},
{"--add-metadata-notes", "if passed, each git commit will have notes with svn commit info"},
{"--resume-from revision", "start importing at svn revision number"},
{"--max-rev revision", "stop importing at svn revision number"},
{"--dry-run", "don't actually write anything"},
{"--create-dump", "don't create the repository but a dump file suitable for piping into fast-import"},
{"--debug-rules", "print what rule is being used for each file"},
{"--commit-interval NUMBER", "if passed the cache will be flushed to git every NUMBER of commits"},
{"--stats", "after a run print some statistics about the rules"},
{"--svn-branches", "Use the contents of SVN when creating branches, Note: SVN tags are branches as well"},
{"--empty-dirs", "Add .gitignore-file for empty dirs"},
{"--svn-ignore", "Import svn-ignore-properties via .gitignore"},
{"--propcheck", "Check for svn-properties except svn-ignore"},
{"-h, --help", "show help"},
{"-v, --version", "show version"},
CommandLineLastOption
@@ -204,7 +199,7 @@ int main(int argc, char **argv)
retry:
int min_rev = 1;
foreach (Rules::Repository rule, rulesList.allRepositories()) {
Repository *repo = createRepository(rule, repositories);
Repository *repo = new Repository(rule);
if (!repo)
return EXIT_FAILURE;
repositories.insert(rule.name, repo);
+56 -305
View File
@@ -26,204 +26,12 @@
static const int maxSimultaneousProcesses = 100;
typedef unsigned long long mark_t;
static const mark_t maxMark = ULONG_MAX;
static const int maxMark = (1 << 20) - 2; // some versions of git-fast-import are buggy for larger values of maxMark
class FastImportRepository : public Repository
class ProcessCache: QLinkedList<Repository *>
{
public:
class Transaction : public Repository::Transaction
{
Q_DISABLE_COPY(Transaction)
friend class FastImportRepository;
FastImportRepository *repository;
QByteArray branch;
QByteArray svnprefix;
QByteArray author;
QByteArray log;
uint datetime;
int revnum;
QVector<int> merges;
QStringList deletedFiles;
QByteArray modifiedFiles;
inline Transaction() {}
public:
~Transaction();
void commit();
void setAuthor(const QByteArray &author);
void setDateTime(uint dt);
void setLog(const QByteArray &log);
void noteCopyFromBranch (const QString &prevbranch, int revFrom);
void deleteFile(const QString &path);
QIODevice *addFile(const QString &path, int mode, qint64 length);
void commitNote(const QByteArray &noteText, bool append,
const QByteArray &commit = QByteArray());
};
FastImportRepository(const Rules::Repository &rule);
int setupIncremental(int &cutoff);
void restoreLog();
~FastImportRepository();
void reloadBranches();
int createBranch(const QString &branch, int revnum,
const QString &branchFrom, int revFrom);
int deleteBranch(const QString &branch, int revnum);
Repository::Transaction *newTransaction(const QString &branch, const QString &svnprefix, int revnum);
void createAnnotatedTag(const QString &name, const QString &svnprefix, int revnum,
const QByteArray &author, uint dt,
const QByteArray &log);
void finalizeTags();
void commit();
bool branchExists(const QString& branch) const;
const QByteArray branchNote(const QString& branch) const;
void setBranchNote(const QString& branch, const QByteArray& noteText);
bool hasPrefix() const;
QString getName() const;
Repository *getEffectiveRepository();
private:
struct Branch
{
int created;
QVector<int> commits;
QVector<int> marks;
QByteArray note;
};
struct AnnotatedTag
{
QString supportingRef;
QByteArray svnprefix;
QByteArray author;
QByteArray log;
uint dt;
int revnum;
};
QHash<QString, Branch> branches;
QHash<QString, AnnotatedTag> annotatedTags;
QString name;
QString prefix;
LoggingQProcess fastImport;
int commitCount;
int outstandingTransactions;
QByteArray deletedBranches;
QByteArray resetBranches;
/* Optional filter to fix up log messages */
QProcess filterMsg;
QByteArray msgFilter(QByteArray);
/* starts at 0, and counts up. */
mark_t last_commit_mark;
/* starts at maxMark and counts down. Reset after each SVN revision */
mark_t next_file_mark;
bool processHasStarted;
void startFastImport();
void closeFastImport();
// called when a transaction is deleted
void forgetTransaction(Transaction *t);
int resetBranch(const QString &branch, int revnum, mark_t mark, const QByteArray &resetTo, const QByteArray &comment);
long long markFrom(const QString &branchFrom, int branchRevNum, QByteArray &desc);
friend class ProcessCache;
Q_DISABLE_COPY(FastImportRepository)
};
class ForwardingRepository : public Repository
{
QString name;
Repository *repo;
QString prefix;
public:
class Transaction : public Repository::Transaction
{
Q_DISABLE_COPY(Transaction)
Repository::Transaction *txn;
QString prefix;
public:
Transaction(Repository::Transaction *t, const QString &p) : txn(t), prefix(p) {}
~Transaction() { delete txn; }
void commit() { txn->commit(); }
void setAuthor(const QByteArray &author) { txn->setAuthor(author); }
void setDateTime(uint dt) { txn->setDateTime(dt); }
void setLog(const QByteArray &log) { txn->setLog(log); }
void noteCopyFromBranch (const QString &prevbranch, int revFrom)
{ txn->noteCopyFromBranch(prevbranch, revFrom); }
void deleteFile(const QString &path) { txn->deleteFile(prefix + path); }
QIODevice *addFile(const QString &path, int mode, qint64 length)
{ return txn->addFile(prefix + path, mode, length); }
void commitNote(const QByteArray &noteText, bool append,
const QByteArray &commit)
{ return txn->commitNote(noteText, append, commit); }
};
ForwardingRepository(const QString &n, Repository *r, const QString &p) : name(n), repo(r), prefix(p) {}
int setupIncremental(int &) { return 1; }
void restoreLog() {}
void reloadBranches() { return repo->reloadBranches(); }
int createBranch(const QString &branch, int revnum,
const QString &branchFrom, int revFrom)
{ return repo->createBranch(branch, revnum, branchFrom, revFrom); }
int deleteBranch(const QString &branch, int revnum)
{ return repo->deleteBranch(branch, revnum); }
Repository::Transaction *newTransaction(const QString &branch, const QString &svnprefix, int revnum)
{
Repository::Transaction *t = repo->newTransaction(branch, svnprefix, revnum);
return new Transaction(t, prefix);
}
void createAnnotatedTag(const QString &name, const QString &svnprefix, int revnum,
const QByteArray &author, uint dt,
const QByteArray &log)
{ repo->createAnnotatedTag(name, svnprefix, revnum, author, dt, log); }
void finalizeTags() { /* loop that called this will invoke it on 'repo' too */ }
void commit() { repo->commit(); }
bool branchExists(const QString& branch) const
{ return repo->branchExists(branch); }
const QByteArray branchNote(const QString& branch) const
{ return repo->branchNote(branch); }
void setBranchNote(const QString& branch, const QByteArray& noteText)
{ repo->setBranchNote(branch, noteText); }
bool hasPrefix() const
{ return !prefix.isEmpty() || repo->hasPrefix(); }
QString getName() const
{ return name; }
Repository *getEffectiveRepository()
{ return repo->getEffectiveRepository(); }
};
class ProcessCache: QLinkedList<FastImportRepository *>
{
public:
void touch(FastImportRepository *repo)
void touch(Repository *repo)
{
remove(repo);
@@ -235,7 +43,7 @@ public:
append(repo);
}
inline void remove(FastImportRepository *repo)
inline void remove(Repository *repo)
{
#if QT_VERSION >= 0x040400
removeOne(repo);
@@ -246,18 +54,6 @@ public:
};
static ProcessCache processCache;
Repository *createRepository(const Rules::Repository &rule, const QHash<QString, Repository *> &repositories)
{
if (rule.forwardTo.isEmpty())
return new FastImportRepository(rule);
Repository *r = repositories[rule.forwardTo];
if (!r) {
qCritical() << "no repository with name" << rule.forwardTo << "found at" << rule.info();
return r;
}
return new ForwardingRepository(rule.name, r, rule.prefix);
}
static QString marksFileName(QString name)
{
name.replace('/', '_');
@@ -265,7 +61,7 @@ static QString marksFileName(QString name)
return name;
}
FastImportRepository::FastImportRepository(const Rules::Repository &rule)
Repository::Repository(const Rules::Repository &rule)
: name(rule.name), prefix(rule.forwardTo), fastImport(name), commitCount(0), outstandingTransactions(0),
last_commit_mark(0), next_file_mark(maxMark), processHasStarted(false)
{
@@ -280,7 +76,7 @@ FastImportRepository::FastImportRepository(const Rules::Repository &rule)
branches["master"].created = 1;
fastImport.setWorkingDirectory(name);
if (!CommandLineParser::instance()->contains("dry-run") && !CommandLineParser::instance()->contains("create-dump")) {
if (!CommandLineParser::instance()->contains("dry-run")) {
if (!QDir(name).exists()) { // repo doesn't exist yet.
qDebug() << "Creating new repository" << name;
QDir::current().mkpath(name);
@@ -309,21 +105,17 @@ FastImportRepository::FastImportRepository(const Rules::Repository &rule)
static QString logFileName(QString name)
{
name.replace('/', '_');
if (CommandLineParser::instance()->contains("create-dump"))
name.append(".fi");
else
name.prepend("log-");
name.prepend("log-");
return name;
}
static mark_t lastValidMark(QString name)
static int lastValidMark(QString name)
{
QFile marksfile(name + "/" + marksFileName(name));
if (!marksfile.open(QIODevice::ReadOnly))
return 0;
qDebug() << "marksfile " << marksfile.fileName() ;
mark_t prev_mark = 0;
int prev_mark = 0;
int lineno = 0;
while (!marksfile.atEnd()) {
@@ -332,17 +124,17 @@ static mark_t lastValidMark(QString name)
if (line.isEmpty())
continue;
mark_t mark = 0;
int mark = 0;
if (line[0] == ':') {
int sp = line.indexOf(' ');
if (sp != -1) {
QString m = line.mid(1, sp-1);
mark = m.toULongLong();
mark = m.toInt();
}
}
if (!mark) {
qCritical() << marksfile.fileName() << "line" << lineno << "marks file corrupt?" << "mark " << mark;
qCritical() << marksfile.fileName() << "line" << lineno << "marks file corrupt?";
return 0;
}
@@ -365,7 +157,7 @@ static mark_t lastValidMark(QString name)
return prev_mark;
}
int FastImportRepository::setupIncremental(int &cutoff)
int Repository::setupIncremental(int &cutoff)
{
QFile logfile(logFileName(name));
if (!logfile.exists())
@@ -375,7 +167,7 @@ int FastImportRepository::setupIncremental(int &cutoff)
QRegExp progress("progress SVN r(\\d+) branch (.*) = :(\\d+)");
mark_t last_valid_mark = lastValidMark(name);
int last_valid_mark = lastValidMark(name);
int last_revnum = 0;
qint64 pos = 0;
@@ -396,7 +188,7 @@ int FastImportRepository::setupIncremental(int &cutoff)
int revnum = progress.cap(1).toInt();
QString branch = progress.cap(2);
mark_t mark = progress.cap(3).toULongLong();
int mark = progress.cap(3).toInt();
if (revnum >= cutoff)
goto beyond_cutoff;
@@ -445,7 +237,7 @@ int FastImportRepository::setupIncremental(int &cutoff)
return cutoff;
}
void FastImportRepository::restoreLog()
void Repository::restoreLog()
{
QString file = logFileName(name);
QString bkup = file + ".old";
@@ -455,13 +247,13 @@ void FastImportRepository::restoreLog()
QFile::rename(bkup, file);
}
FastImportRepository::~FastImportRepository()
Repository::~Repository()
{
Q_ASSERT(outstandingTransactions == 0);
closeFastImport();
}
void FastImportRepository::closeFastImport()
void Repository::closeFastImport()
{
if (fastImport.state() != QProcess::NotRunning) {
fastImport.write("checkpoint\n");
@@ -477,7 +269,7 @@ void FastImportRepository::closeFastImport()
processCache.remove(this);
}
void FastImportRepository::reloadBranches()
void Repository::reloadBranches()
{
bool reset_notes = false;
foreach (QString branch, branches.keys()) {
@@ -505,7 +297,7 @@ void FastImportRepository::reloadBranches()
}
}
long long FastImportRepository::markFrom(const QString &branchFrom, int branchRevNum, QByteArray &branchFromDesc)
int Repository::markFrom(const QString &branchFrom, int branchRevNum, QByteArray &branchFromDesc)
{
Branch &brFrom = branches[branchFrom];
if (!brFrom.created)
@@ -535,11 +327,11 @@ long long FastImportRepository::markFrom(const QString &branchFrom, int branchRe
return brFrom.marks[it - brFrom.commits.begin()];
}
int FastImportRepository::createBranch(const QString &branch, int revnum,
const QString &branchFrom, int branchRevNum)
int Repository::createBranch(const QString &branch, int revnum,
const QString &branchFrom, int branchRevNum)
{
QByteArray branchFromDesc = "from branch " + branchFrom.toUtf8();
long long mark = markFrom(branchFrom, branchRevNum, branchFromDesc);
int mark = markFrom(branchFrom, branchRevNum, branchFromDesc);
if (mark == -1) {
qCritical() << branch << "in repository" << name
@@ -566,13 +358,13 @@ int FastImportRepository::createBranch(const QString &branch, int revnum,
return resetBranch(branch, revnum, mark, branchFromRef, branchFromDesc);
}
int FastImportRepository::deleteBranch(const QString &branch, int revnum)
int Repository::deleteBranch(const QString &branch, int revnum)
{
static QByteArray null_sha(40, '0');
return resetBranch(branch, revnum, 0, null_sha, "delete");
}
int FastImportRepository::resetBranch(const QString &branch, int revnum, mark_t mark, const QByteArray &resetTo, const QByteArray &comment)
int Repository::resetBranch(const QString &branch, int revnum, int mark, const QByteArray &resetTo, const QByteArray &comment)
{
QByteArray branchRef = branch.toUtf8();
if (!branchRef.startsWith("refs/"))
@@ -607,7 +399,7 @@ int FastImportRepository::resetBranch(const QString &branch, int revnum, mark_t
return EXIT_SUCCESS;
}
void FastImportRepository::commit()
void Repository::commit()
{
if (deletedBranches.isEmpty() && resetBranches.isEmpty()) {
return;
@@ -619,8 +411,8 @@ void FastImportRepository::commit()
resetBranches.clear();
}
Repository::Transaction *FastImportRepository::newTransaction(const QString &branch, const QString &svnprefix,
int revnum)
Repository::Transaction *Repository::newTransaction(const QString &branch, const QString &svnprefix,
int revnum)
{
if (!branches.contains(branch)) {
qWarning() << "WARN: Transaction:" << branch << "is not a known branch in repository" << name << endl
@@ -638,22 +430,22 @@ Repository::Transaction *FastImportRepository::newTransaction(const QString &bra
startFastImport();
// write everything to disk every 10000 commits
fastImport.write("checkpoint\n");
qDebug() << "checkpoint!, marks file trunkated";
qDebug() << "checkpoint!, marks file truncated";
}
outstandingTransactions++;
return txn;
}
void FastImportRepository::forgetTransaction(Transaction *)
void Repository::forgetTransaction(Transaction *)
{
if (!--outstandingTransactions)
next_file_mark = maxMark;
}
void FastImportRepository::createAnnotatedTag(const QString &ref, const QString &svnprefix,
int revnum,
const QByteArray &author, uint dt,
const QByteArray &log)
void Repository::createAnnotatedTag(const QString &ref, const QString &svnprefix,
int revnum,
const QByteArray &author, uint dt,
const QByteArray &log)
{
QString tagName = ref;
if (tagName.startsWith("refs/tags/"))
@@ -673,7 +465,7 @@ void FastImportRepository::createAnnotatedTag(const QString &ref, const QString
tag.dt = dt;
}
void FastImportRepository::finalizeTags()
void Repository::finalizeTags()
{
if (annotatedTags.isEmpty())
return;
@@ -733,30 +525,7 @@ void FastImportRepository::finalizeTags()
printf("\n");
}
QByteArray
FastImportRepository::msgFilter(QByteArray msg)
{
QByteArray output = msg;
if (CommandLineParser::instance()->contains("msg-filter")) {
if (filterMsg.state() == QProcess::Running)
qFatal("filter process already running?");
filterMsg.start(CommandLineParser::instance()->optionArgument("msg-filter"));
if(!(filterMsg.waitForStarted(-1)))
qFatal("Failed to Start Filter %d %s", __LINE__, qPrintable(filterMsg.errorString()));
filterMsg.write(msg);
filterMsg.closeWriteChannel();
filterMsg.waitForFinished();
output = filterMsg.readAllStandardOutput();
}
return output;
}
void FastImportRepository::startFastImport()
void Repository::startFastImport()
{
processCache.touch(this);
@@ -775,7 +544,7 @@ void FastImportRepository::startFastImport()
fastImport.setStandardOutputFile(logFileName(name), QIODevice::Append);
fastImport.setProcessChannelMode(QProcess::MergedChannels);
if (!CommandLineParser::instance()->contains("dry-run") && !CommandLineParser::instance()->contains("create-dump")) {
if (!CommandLineParser::instance()->contains("dry-run")) {
fastImport.start("git", QStringList() << "fast-import" << marksOptions);
} else {
fastImport.start("/bin/cat", QStringList());
@@ -795,65 +564,50 @@ QByteArray Repository::formatMetadataMessage(const QByteArray &svnprefix, int re
return msg;
}
bool FastImportRepository::branchExists(const QString& branch) const
bool Repository::branchExists(const QString& branch) const
{
return branches.contains(branch);
}
const QByteArray FastImportRepository::branchNote(const QString& branch) const
const QByteArray Repository::branchNote(const QString& branch) const
{
return branches.value(branch).note;
}
void FastImportRepository::setBranchNote(const QString& branch, const QByteArray& noteText)
void Repository::setBranchNote(const QString& branch, const QByteArray& noteText)
{
if (branches.contains(branch))
branches[branch].note = noteText;
}
bool FastImportRepository::hasPrefix() const
{
return !prefix.isEmpty();
}
QString FastImportRepository::getName() const
{
return name;
}
Repository *FastImportRepository::getEffectiveRepository()
{
return this;
}
FastImportRepository::Transaction::~Transaction()
Repository::Transaction::~Transaction()
{
repository->forgetTransaction(this);
}
void FastImportRepository::Transaction::setAuthor(const QByteArray &a)
void Repository::Transaction::setAuthor(const QByteArray &a)
{
author = a;
}
void FastImportRepository::Transaction::setDateTime(uint dt)
void Repository::Transaction::setDateTime(uint dt)
{
datetime = dt;
}
void FastImportRepository::Transaction::setLog(const QByteArray &l)
void Repository::Transaction::setLog(const QByteArray &l)
{
log = l;
}
void FastImportRepository::Transaction::noteCopyFromBranch(const QString &branchFrom, int branchRevNum)
void Repository::Transaction::noteCopyFromBranch(const QString &branchFrom, int branchRevNum)
{
if(branch == branchFrom) {
qWarning() << "WARN: Cannot merge inside a branch";
return;
}
static QByteArray dummy;
long long mark = repository->markFrom(branchFrom, branchRevNum, dummy);
int mark = repository->markFrom(branchFrom, branchRevNum, dummy);
Q_ASSERT(dummy.isEmpty());
if (mark == -1) {
@@ -874,7 +628,7 @@ void FastImportRepository::Transaction::noteCopyFromBranch(const QString &branch
}
}
void FastImportRepository::Transaction::deleteFile(const QString &path)
void Repository::Transaction::deleteFile(const QString &path)
{
QString pathNoSlash = repository->prefix + path;
if(pathNoSlash.endsWith('/'))
@@ -882,9 +636,9 @@ void FastImportRepository::Transaction::deleteFile(const QString &path)
deletedFiles.append(pathNoSlash);
}
QIODevice *FastImportRepository::Transaction::addFile(const QString &path, int mode, qint64 length)
QIODevice *Repository::Transaction::addFile(const QString &path, int mode, qint64 length)
{
mark_t mark = repository->next_file_mark--;
int mark = repository->next_file_mark--;
// in case the two mark allocations meet, we might as well just abort
Q_ASSERT(mark > repository->last_commit_mark + 1);
@@ -911,7 +665,7 @@ QIODevice *FastImportRepository::Transaction::addFile(const QString &path, int m
return &repository->fastImport;
}
void FastImportRepository::Transaction::commitNote(const QByteArray &noteText, bool append, const QByteArray &commit)
void Repository::Transaction::commitNote(const QByteArray &noteText, bool append, const QByteArray &commit)
{
QByteArray branchRef = branch;
if (!branchRef.startsWith("refs/"))
@@ -944,14 +698,14 @@ void FastImportRepository::Transaction::commitNote(const QByteArray &noteText, b
}
}
void FastImportRepository::Transaction::commit()
void Repository::Transaction::commit()
{
repository->startFastImport();
// We might be tempted to use the SVN revision number as the fast-import commit mark.
// However, a single SVN revision can modify multple branches, and thus lead to multiple
// However, a single SVN revision can modify multiple branches, and thus lead to multiple
// commits in the same repo. So, we need to maintain a separate commit mark counter.
mark_t mark = ++repository->last_commit_mark;
int mark = ++repository->last_commit_mark;
// in case the two mark allocations meet, we might as well just abort
Q_ASSERT(mark < repository->next_file_mark - 1);
@@ -963,10 +717,7 @@ void FastImportRepository::Transaction::commit()
if (CommandLineParser::instance()->contains("add-metadata"))
message += "\n" + Repository::formatMetadataMessage(svnprefix, revnum);
// Call external message filter if provided
message = repository->msgFilter(message);
mark_t parentmark = 0;
int parentmark = 0;
Branch &br = repository->branches[branch];
if (br.created && !br.marks.isEmpty() && br.marks.last()) {
parentmark = br.marks.last();
@@ -992,7 +743,7 @@ void FastImportRepository::Transaction::commit()
// note some of the inferred merges
QByteArray desc = "";
mark_t i = !!parentmark; // if parentmark != 0, there's at least one parent
int i = !!parentmark; // if parentmark != 0, there's at least one parent
if(log.contains("This commit was manufactured by cvs2svn") && merges.count() > 1) {
qSort(merges);
@@ -1001,7 +752,7 @@ void FastImportRepository::Transaction::commit()
qWarning() << "WARN: Discarding all but the highest merge point as a workaround for cvs2svn created branch/tag"
<< "Discarded marks:" << merges;
} else {
foreach (const mark_t merge, merges) {
foreach (const int merge, merges) {
if (merge == parentmark) {
qDebug() << "Skipping marking" << merge << "as a merge point as it matches the parent";
continue;
+90 -34
View File
@@ -91,59 +91,115 @@ public:
}
};
class Repository
{
public:
class Transaction
{
Q_DISABLE_COPY(Transaction)
protected:
Transaction() {}
friend class Repository;
Repository *repository;
QByteArray branch;
QByteArray svnprefix;
QByteArray author;
QByteArray log;
uint datetime;
int revnum;
QVector<int> merges;
QStringList deletedFiles;
QByteArray modifiedFiles;
inline Transaction() {}
public:
virtual ~Transaction() {}
virtual void commit() = 0;
~Transaction();
void commit();
virtual void setAuthor(const QByteArray &author) = 0;
virtual void setDateTime(uint dt) = 0;
virtual void setLog(const QByteArray &log) = 0;
void setAuthor(const QByteArray &author);
void setDateTime(uint dt);
void setLog(const QByteArray &log);
virtual void noteCopyFromBranch (const QString &prevbranch, int revFrom) = 0;
void noteCopyFromBranch (const QString &prevbranch, int revFrom);
virtual void deleteFile(const QString &path) = 0;
virtual QIODevice *addFile(const QString &path, int mode, qint64 length) = 0;
void deleteFile(const QString &path);
QIODevice *addFile(const QString &path, int mode, qint64 length);
virtual void commitNote(const QByteArray &noteText, bool append,
const QByteArray &commit = QByteArray()) = 0;
void commitNote(const QByteArray &noteText, bool append,
const QByteArray &commit = QByteArray());
};
virtual int setupIncremental(int &cutoff) = 0;
virtual void restoreLog() = 0;
virtual ~Repository() {}
Repository(const Rules::Repository &rule);
int setupIncremental(int &cutoff);
void restoreLog();
~Repository();
virtual void reloadBranches() = 0;
virtual int createBranch(const QString &branch, int revnum,
const QString &branchFrom, int revFrom) = 0;
virtual int deleteBranch(const QString &branch, int revnum) = 0;
virtual Repository::Transaction *newTransaction(const QString &branch, const QString &svnprefix, int revnum) = 0;
void reloadBranches();
int createBranch(const QString &branch, int revnum,
const QString &branchFrom, int revFrom);
int deleteBranch(const QString &branch, int revnum);
Repository::Transaction *newTransaction(const QString &branch, const QString &svnprefix, int revnum);
virtual void createAnnotatedTag(const QString &name, const QString &svnprefix, int revnum,
const QByteArray &author, uint dt,
const QByteArray &log) = 0;
virtual void finalizeTags() = 0;
virtual void commit() = 0;
void createAnnotatedTag(const QString &name, const QString &svnprefix, int revnum,
const QByteArray &author, uint dt,
const QByteArray &log);
void finalizeTags();
void commit();
static QByteArray formatMetadataMessage(const QByteArray &svnprefix, int revnum,
const QByteArray &tag = QByteArray());
virtual bool branchExists(const QString& branch) const = 0;
virtual const QByteArray branchNote(const QString& branch) const = 0;
virtual void setBranchNote(const QString& branch, const QByteArray& noteText) = 0;
bool branchExists(const QString& branch) const;
const QByteArray branchNote(const QString& branch) const;
void setBranchNote(const QString& branch, const QByteArray& noteText);
virtual bool hasPrefix() const = 0;
private:
struct Branch
{
int created;
QVector<int> commits;
QVector<int> marks;
QByteArray note;
};
struct AnnotatedTag
{
QString supportingRef;
QByteArray svnprefix;
QByteArray author;
QByteArray log;
uint dt;
int revnum;
};
virtual QString getName() const = 0;
virtual Repository *getEffectiveRepository() = 0;
QHash<QString, Branch> branches;
QHash<QString, AnnotatedTag> annotatedTags;
QString name;
QString prefix;
LoggingQProcess fastImport;
int commitCount;
int outstandingTransactions;
QByteArray deletedBranches;
QByteArray resetBranches;
/* starts at 0, and counts up. */
int last_commit_mark;
/* starts at maxMark and counts down. Reset after each SVN revision */
int next_file_mark;
bool processHasStarted;
void startFastImport();
void closeFastImport();
// called when a transaction is deleted
void forgetTransaction(Transaction *t);
int resetBranch(const QString &branch, int revnum, int mark, const QByteArray &resetTo, const QByteArray &comment);
int markFrom(const QString &branchFrom, int branchRevNum, QByteArray &desc);
friend class ProcessCache;
Q_DISABLE_COPY(Repository)
};
Repository *createRepository(const Rules::Repository &rule, const QHash<QString, Repository *> &repositories);
#endif
+12 -22
View File
@@ -207,18 +207,6 @@ void Rules::load(const QString &filename)
repo.prefix = matchPrefixLine.cap(1);
continue;
} else if (line == "end repository") {
if (!repo.forwardTo.isEmpty()
&& !repo.description.isEmpty()) {
qFatal("Specifing repository and description on repository is invalid on line %d", lineNumber);
}
if (!repo.forwardTo.isEmpty()
&& !repo.branches.isEmpty()) {
qFatal("Specifing repository and branches on repository is invalid on line %d", lineNumber);
}
m_repositories += repo;
{
// clear out 'repo'
@@ -331,7 +319,7 @@ public:
void ruleMatched(const Rules::Match &rule, const int rev);
void addRule(const Rules::Match &rule);
private:
QMap<Rules::Match,int> m_usedRules;
QMap<QString,int> m_usedRules;
};
Stats::Stats() : d(new Private())
@@ -381,27 +369,29 @@ Stats::Private::Private()
void Stats::Private::printStats() const
{
printf("\nRule stats\n");
foreach(const Rules::Match rule, m_usedRules.keys()) {
printf("%s was matched %i times\n", qPrintable(rule.info()), m_usedRules[rule]);
foreach(const QString name, m_usedRules.keys()) {
printf("%s was matched %i times\n", qPrintable(name), m_usedRules[name]);
}
}
void Stats::Private::ruleMatched(const Rules::Match &rule, const int rev)
{
Q_UNUSED(rev);
if(!m_usedRules.contains(rule)) {
m_usedRules.insert(rule, 1);
qWarning() << "WARN: New match rule" << rule.info() << ", should have been added when created.";
const QString name = rule.info();
if(!m_usedRules.contains(name)) {
m_usedRules.insert(name, 1);
qWarning() << "WARN: New match rule, should have been added when created.";
} else {
m_usedRules[rule]++;
m_usedRules[name]++;
}
}
void Stats::Private::addRule( const Rules::Match &rule)
{
if(m_usedRules.contains(rule))
qWarning() << "WARN: Rule" << rule.info() << "was added multiple times.";
m_usedRules.insert(rule, 0);
const QString name = rule.info();
if(m_usedRules.contains(name))
qWarning() << "WARN: Rule" << name << "was added multiple times.";
m_usedRules.insert(name, 0);
}
#ifndef QT_NO_DEBUG_STREAM
-5
View File
@@ -83,11 +83,6 @@ public:
} action;
Match() : minRevision(-1), maxRevision(-1), annotate(false), action(Ignore) { }
bool operator<(const Match other) const {
if (filename != other.filename)
return filename < other.filename;
return lineNumber < other.lineNumber;
}
const QString info() const {
const QString info = Rule::filename % ":" % QByteArray::number(Rule::lineNumber) % " " % rx.pattern();
return info;
+76 -226
View File
@@ -62,13 +62,9 @@ class AprAutoPool
AprAutoPool &operator=(const AprAutoPool &);
public:
inline AprAutoPool(apr_pool_t *parent = NULL)
{
pool = svn_pool_create(parent);
}
inline ~AprAutoPool()
{
svn_pool_destroy(pool);
}
{ pool = svn_pool_create(parent); }
inline ~AprAutoPool()
{ svn_pool_destroy(pool); }
inline void clear() { svn_pool_clear(pool); }
inline apr_pool_t *data() const { return pool; }
@@ -92,7 +88,6 @@ public:
private:
AprAutoPool global_pool;
AprAutoPool scratch_pool;
svn_fs_t *fs;
svn_revnum_t youngest_rev;
};
@@ -150,7 +145,7 @@ bool Svn::exportRevision(int revnum)
}
SvnPrivate::SvnPrivate(const QString &pathToRepository)
: global_pool(NULL) , scratch_pool(NULL)
: global_pool(NULL)
{
if( openRepository(pathToRepository) != EXIT_SUCCESS) {
qCritical() << "Failed to open repository";
@@ -161,7 +156,10 @@ SvnPrivate::SvnPrivate(const QString &pathToRepository)
svn_fs_youngest_rev(&youngest_rev, fs, global_pool);
}
SvnPrivate::~SvnPrivate() {}
SvnPrivate::~SvnPrivate()
{
svn_pool_destroy(global_pool);
}
int SvnPrivate::youngestRevision()
{
@@ -174,11 +172,7 @@ int SvnPrivate::openRepository(const QString &pathToRepository)
QString path = pathToRepository;
while (path.endsWith('/')) // no trailing slash allowed
path = path.mid(0, path.length()-1);
#ifndef USE_SVN_REPOS_OPEN
SVN_ERR(svn_repos_open3(&repos, QFile::encodeName(path), NULL, global_pool, scratch_pool));
#else
SVN_ERR(svn_repos_open(&repos, QFile::encodeName(path), global_pool));
#endif
fs = svn_repos_fs(repos);
return EXIT_SUCCESS;
@@ -211,6 +205,39 @@ findMatchRule(const MatchRuleList &matchRules, int revnum, const QString &curren
return end;
}
static void splitPathName(const Rules::Match &rule, const QString &pathName, QString *svnprefix_p,
QString *repository_p, QString *branch_p, QString *path_p)
{
QString svnprefix = pathName;
svnprefix.truncate(rule.rx.matchedLength());
if (svnprefix_p) {
*svnprefix_p = svnprefix;
}
if (repository_p) {
*repository_p = svnprefix;
repository_p->replace(rule.rx, rule.repository);
foreach (Rules::Match::Substitution subst, rule.repo_substs) {
subst.apply(*repository_p);
}
}
if (branch_p) {
*branch_p = svnprefix;
branch_p->replace(rule.rx, rule.branch);
foreach (Rules::Match::Substitution subst, rule.branch_substs) {
subst.apply(*branch_p);
}
}
if (path_p) {
QString prefix = svnprefix;
prefix.replace(rule.rx, rule.prefix);
*path_p = prefix + pathName.mid(svnprefix.length());
}
}
static int pathMode(svn_fs_root_t *fs_root, const char *pathname, apr_pool_t *pool)
{
svn_string_t *propvalue;
@@ -270,11 +297,7 @@ static int dumpBlob(Repository::Transaction *txn, svn_fs_root_t *fs_root,
if (!CommandLineParser::instance()->contains("dry-run")) {
QByteArray buf;
buf.reserve(len);
#ifndef USE_SVN_STREAM_READ
SVN_ERR(svn_stream_read_full(in_stream, buf.data(), &len));
#else
SVN_ERR(svn_stream_read(in_stream, buf.data(), &len));
#endif
SVN_ERR(svn_stream_read(in_stream, buf.data(), &len));
if (len == strlen("link ") && strncmp(buf, "link ", len) == 0) {
mode = 0120000;
stream_length -= len;
@@ -293,13 +316,9 @@ static int dumpBlob(Repository::Transaction *txn, svn_fs_root_t *fs_root,
if (!CommandLineParser::instance()->contains("dry-run")) {
// open a generic svn_stream_t for the QIODevice
out_stream = streamForDevice(io, dumppool);
#ifndef USE_SVN_STREAM_COPY
SVN_ERR(svn_stream_copy3(in_stream, out_stream, NULL, NULL, dumppool));
#else
SVN_ERR(svn_stream_copy(in_stream, out_stream, dumppool));
svn_stream_close(out_stream);
svn_stream_close(in_stream);
#endif
SVN_ERR(svn_stream_copy(in_stream, out_stream, dumppool));
svn_stream_close(out_stream);
svn_stream_close(in_stream);
// print an ending newline
io->putChar('\n');
@@ -411,24 +430,17 @@ public:
int fetchRevProps();
int commit();
int exportEntry(const char *path, const svn_fs_path_change2_t *change, apr_hash_t *changes);
int exportDispatch(const char *path, const svn_fs_path_change2_t *change,
int exportEntry(const char *path, const svn_fs_path_change_t *change, apr_hash_t *changes);
int exportDispatch(const char *path, const svn_fs_path_change_t *change,
const char *path_from, svn_revnum_t rev_from,
apr_hash_t *changes, const QString &current, const Rules::Match &rule,
const MatchRuleList &matchRules, apr_pool_t *pool);
int exportInternal(const char *path, const svn_fs_path_change2_t *change,
int exportInternal(const char *path, const svn_fs_path_change_t *change,
const char *path_from, svn_revnum_t rev_from,
const QString &current, const Rules::Match &rule, const MatchRuleList &matchRules);
int recurse(const char *path, const svn_fs_path_change2_t *change,
int recurse(const char *path, const svn_fs_path_change_t *change,
const char *path_from, const MatchRuleList &matchRules, svn_revnum_t rev_from,
apr_hash_t *changes, apr_pool_t *pool);
int addGitIgnore(apr_pool_t *pool, const char *key, QString path,
svn_fs_root_t *fs_root, Repository::Transaction *txn, const char *content = NULL);
int fetchIgnoreProps(QString *ignore, apr_pool_t *pool, const char *key, svn_fs_root_t *fs_root);
int fetchUnknownProps(apr_pool_t *pool, const char *key, svn_fs_root_t *fs_root);
private:
void splitPathName(const Rules::Match &rule, const QString &pathName, QString *svnprefix_p,
QString *repository_p, QString *effectiveRepository_p, QString *branch_p, QString *path_p);
};
int SvnPrivate::exportRevision(int revnum)
@@ -461,64 +473,19 @@ int SvnPrivate::exportRevision(int revnum)
return EXIT_SUCCESS;
}
void SvnRevision::splitPathName(const Rules::Match &rule, const QString &pathName, QString *svnprefix_p,
QString *repository_p, QString *effectiveRepository_p, QString *branch_p, QString *path_p)
{
QString svnprefix = pathName;
svnprefix.truncate(rule.rx.matchedLength());
if (svnprefix_p) {
*svnprefix_p = svnprefix;
}
if (repository_p) {
*repository_p = svnprefix;
repository_p->replace(rule.rx, rule.repository);
foreach (Rules::Match::Substitution subst, rule.repo_substs) {
subst.apply(*repository_p);
}
}
if (effectiveRepository_p) {
*effectiveRepository_p = svnprefix;
effectiveRepository_p->replace(rule.rx, rule.repository);
foreach (Rules::Match::Substitution subst, rule.repo_substs) {
subst.apply(*effectiveRepository_p);
}
Repository *repository = repositories.value(*effectiveRepository_p, 0);
if (repository) {
*effectiveRepository_p = repository->getEffectiveRepository()->getName();
}
}
if (branch_p) {
*branch_p = svnprefix;
branch_p->replace(rule.rx, rule.branch);
foreach (Rules::Match::Substitution subst, rule.branch_substs) {
subst.apply(*branch_p);
}
}
if (path_p) {
QString prefix = svnprefix;
prefix.replace(rule.rx, rule.prefix);
*path_p = prefix + pathName.mid(svnprefix.length());
}
}
int SvnRevision::prepareTransactions()
{
// find out what was changed in this revision:
apr_hash_t *changes;
SVN_ERR(svn_fs_paths_changed2(&changes, fs_root, pool));
SVN_ERR(svn_fs_paths_changed(&changes, fs_root, pool));
QMap<QByteArray, svn_fs_path_change2_t*> map;
QMap<QByteArray, svn_fs_path_change_t*> map;
for (apr_hash_index_t *i = apr_hash_first(pool, changes); i; i = apr_hash_next(i)) {
const void *vkey;
void *value;
apr_hash_this(i, &vkey, NULL, &value);
const char *key = reinterpret_cast<const char *>(vkey);
svn_fs_path_change2_t *change = reinterpret_cast<svn_fs_path_change2_t *>(value);
svn_fs_path_change_t *change = reinterpret_cast<svn_fs_path_change_t *>(value);
// If we mix path deletions with path adds/replaces we might erase a
// branch after that it has been reset -> history truncated
if (map.contains(QByteArray(key))) {
@@ -535,7 +502,7 @@ int SvnRevision::prepareTransactions()
map.insertMulti(QByteArray(key), change);
}
QMapIterator<QByteArray, svn_fs_path_change2_t*> i(map);
QMapIterator<QByteArray, svn_fs_path_change_t*> i(map);
while (i.hasNext()) {
i.next();
if (exportEntry(i.key(), i.value(), changes) == EXIT_FAILURE)
@@ -556,12 +523,9 @@ int SvnRevision::fetchRevProps()
svn_string_t *svndate = (svn_string_t*)apr_hash_get(revprops, "svn:date", APR_HASH_KEY_STRING);
svn_string_t *svnlog = (svn_string_t*)apr_hash_get(revprops, "svn:log", APR_HASH_KEY_STRING);
if (svnlog)
log = svnlog->data;
else
log.clear();
log = svnlog->data;
authorident = svnauthor ? identities.value(svnauthor->data) : QByteArray();
epoch = svndate ? get_epoch(svndate->data) : 0;
epoch = get_epoch(svndate->data);
if (authorident.isEmpty()) {
if (!svnauthor || svn_string_isempty(svnauthor))
authorident = "nobody <nobody@localhost>";
@@ -594,42 +558,21 @@ int SvnRevision::commit()
return EXIT_SUCCESS;
}
int SvnRevision::exportEntry(const char *key, const svn_fs_path_change2_t *change,
int SvnRevision::exportEntry(const char *key, const svn_fs_path_change_t *change,
apr_hash_t *changes)
{
AprAutoPool revpool(pool.data());
QString current = QString::fromUtf8(key);
// was this copied from somewhere?
svn_revnum_t rev_from = SVN_INVALID_REVNUM;
const char *path_from = NULL;
if (change->change_kind != svn_fs_path_change_delete) {
// svn_fs_copied_from would fail on deleted paths, because the path
// obviously no longer exists in the current revision
SVN_ERR(svn_fs_copied_from(&rev_from, &path_from, fs_root, key, revpool));
}
svn_revnum_t rev_from;
const char *path_from;
SVN_ERR(svn_fs_copied_from(&rev_from, &path_from, fs_root, key, revpool));
// is this a directory?
svn_boolean_t is_dir;
SVN_ERR(svn_fs_is_dir(&is_dir, fs_root, key, revpool));
// Adding newly created directories
if (is_dir && change->change_kind == svn_fs_path_change_add && path_from == NULL
&& CommandLineParser::instance()->contains("empty-dirs")) {
QString keyQString = key;
// Skipping SVN-directory-layout
if (keyQString.endsWith("/trunk") || keyQString.endsWith("/branches") || keyQString.endsWith("/tags")) {
//qDebug() << "Skipping SVN-directory-layout:" << keyQString;
return EXIT_SUCCESS;
}
needCommit = true;
//qDebug() << "Adding directory:" << key;
}
// svn:ignore-properties
else if (is_dir && (change->change_kind == svn_fs_path_change_add || change->change_kind == svn_fs_path_change_modify)
&& path_from == NULL && CommandLineParser::instance()->contains("svn-ignore")) {
needCommit = true;
}
else if (is_dir) {
if (is_dir) {
if (change->change_kind == svn_fs_path_change_modify ||
change->change_kind == svn_fs_path_change_add) {
if (path_from == NULL) {
@@ -697,7 +640,7 @@ int SvnRevision::exportEntry(const char *key, const svn_fs_path_change2_t *chang
return EXIT_SUCCESS;
}
int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change2_t *change,
int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change_t *change,
const char *path_from, svn_revnum_t rev_from,
apr_hash_t *changes, const QString &current,
const Rules::Match &rule, const MatchRuleList &matchRules, apr_pool_t *pool)
@@ -735,13 +678,13 @@ int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change2_t *ch
return EXIT_FAILURE;
}
int SvnRevision::exportInternal(const char *key, const svn_fs_path_change2_t *change,
int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *change,
const char *path_from, svn_revnum_t rev_from,
const QString &current, const Rules::Match &rule, const MatchRuleList &matchRules)
{
needCommit = true;
QString svnprefix, repository, effectiveRepository, branch, path;
splitPathName(rule, current, &svnprefix, &repository, &effectiveRepository, &branch, &path);
QString svnprefix, repository, branch, path;
splitPathName(rule, current, &svnprefix, &repository, &branch, &path);
Repository *repo = repositories.value(repository, 0);
if (!repo) {
@@ -756,14 +699,14 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change2_t *ch
// qDebug() << " " << qPrintable(current) << "rev" << revnum << "->"
// << qPrintable(repository) << qPrintable(branch) << qPrintable(path);
if (change->change_kind == svn_fs_path_change_delete && current == svnprefix && path.isEmpty() && !repo->hasPrefix()) {
if (change->change_kind == svn_fs_path_change_delete && current == svnprefix && path.isEmpty()) {
if(ruledebug)
qDebug() << "repository" << repository << "branch" << branch << "deleted";
return repo->deleteBranch(branch, revnum);
}
QString previous;
QString prevsvnprefix, prevrepository, preveffectiverepository, prevbranch, prevpath;
QString prevsvnprefix, prevrepository, prevbranch, prevpath;
if (path_from != NULL) {
previous = QString::fromUtf8(path_from);
@@ -774,7 +717,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change2_t *ch
findMatchRule(matchRules, rev_from, previous, NoIgnoreRule);
if (prevmatch != matchRules.constEnd()) {
splitPathName(*prevmatch, previous, &prevsvnprefix, &prevrepository,
&preveffectiverepository, &prevbranch, &prevpath);
&prevbranch, &prevpath);
} else {
qWarning() << "WARN: SVN reports a \"copy from\" @" << revnum << "from" << path_from << "@" << rev_from << "but no matching rules found! Ignoring copy, treating as a modification";
@@ -790,7 +733,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change2_t *ch
<< qPrintable(prevrepository) << "branch"
<< qPrintable(prevbranch) << "subdir"
<< qPrintable(prevpath);
} else if (preveffectiverepository != effectiveRepository) {
} else if (prevrepository != repository) {
qWarning() << "WARN:" << qPrintable(current) << "rev" << revnum
<< "is a cross-repository copy (from repository"
<< qPrintable(prevrepository) << "branch"
@@ -858,7 +801,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change2_t *ch
// changes across directory re-organizations and wholesale branch
// imports.
//
if (path_from != NULL && preveffectiverepository == effectiveRepository && prevbranch != branch) {
if (path_from != NULL && prevrepository == repository && prevbranch != branch) {
if(ruledebug)
qDebug() << "copy from branch" << prevbranch << "to branch" << branch << "@rev" << rev_from;
txn->noteCopyFromBranch (prevbranch, rev_from);
@@ -880,49 +823,14 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change2_t *ch
} else {
if(ruledebug)
qDebug() << "add/change dir (" << key << "->" << branch << path << ")";
// Check unknown svn-properties
if (((path_from == NULL && change->prop_mod==1) || (path_from != NULL && change->change_kind == svn_fs_path_change_add))
&& CommandLineParser::instance()->contains("propcheck")) {
if (fetchUnknownProps(pool, key, fs_root) != EXIT_SUCCESS) {
qWarning() << "Error checking svn-properties (" << key << ")";
}
}
int ignoreSet = false;
// Add GitIgnore with svn:ignore
if (((path_from == NULL && change->prop_mod==1) || (path_from != NULL && change->change_kind == svn_fs_path_change_add))
&& CommandLineParser::instance()->contains("svn-ignore")) {
QString svnignore;
// TODO: Check if svn:ignore or other property was changed, but always set on copy/rename (path_from != NULL)
if (fetchIgnoreProps(&svnignore, pool, key, fs_root) != EXIT_SUCCESS) {
qWarning() << "Error fetching svn-properties (" << key << ")";
} else if (!svnignore.isNull()) {
addGitIgnore(pool, key, path, fs_root, txn, svnignore.toStdString().c_str());
ignoreSet = true;
}
}
// Add GitIgnore for empty directories (if GitIgnore was not set previously)
if (CommandLineParser::instance()->contains("empty-dirs") && ignoreSet == false) {
if (addGitIgnore(pool, key, path, fs_root, txn) == EXIT_SUCCESS) {
return EXIT_SUCCESS;
} else {
ignoreSet = true;
}
}
if (ignoreSet == false) {
txn->deleteFile(path);
}
txn->deleteFile(path);
recursiveDumpDir(txn, fs_root, key, path, pool);
}
return EXIT_SUCCESS;
}
int SvnRevision::recurse(const char *path, const svn_fs_path_change2_t *change,
int SvnRevision::recurse(const char *path, const svn_fs_path_change_t *change,
const char *path_from, const MatchRuleList &matchRules, svn_revnum_t rev_from,
apr_hash_t *changes, apr_pool_t *pool)
{
@@ -934,7 +842,7 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change2_t *change,
svn_node_kind_t kind;
SVN_ERR(svn_fs_check_path(&kind, fs_root, path, pool));
if(kind == svn_node_none) {
qWarning() << "WARN: Trying to recurse using a nonexistant path" << path << ", ignoring";
qWarning() << "WARN: Trying to recurse using a nonexistent path" << path << ", ignoring";
return EXIT_SUCCESS;
} else if(kind != svn_node_dir) {
qWarning() << "WARN: Trying to recurse using a non-directory path" << path << ", ignoring";
@@ -954,6 +862,8 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change2_t *change,
void *value;
apr_hash_this(i, &vkey, NULL, &value);
svn_fs_dirent_t *dirent = reinterpret_cast<svn_fs_dirent_t *>(value);
if (dirent->kind != svn_node_dir)
continue; // not a directory, so can't recurse; skip
map.insertMulti(QByteArray(dirent->name), dirent->kind);
}
@@ -967,8 +877,8 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change2_t *change,
entryFrom = path_from + QByteArray("/") + i.key();
// check if this entry is in the changelist for this revision already
svn_fs_path_change2_t *otherchange =
(svn_fs_path_change2_t*)apr_hash_get(changes, entry.constData(), APR_HASH_KEY_STRING);
svn_fs_path_change_t *otherchange =
(svn_fs_path_change_t*)apr_hash_get(changes, entry.constData(), APR_HASH_KEY_STRING);
if (otherchange && otherchange->change_kind == svn_fs_path_change_add) {
qDebug() << entry << "rev" << revnum
<< "is in the change-list, deferring to that one";
@@ -998,63 +908,3 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change2_t *change,
return EXIT_SUCCESS;
}
int SvnRevision::addGitIgnore(apr_pool_t *pool, const char *key, QString path,
svn_fs_root_t *fs_root, Repository::Transaction *txn, const char *content)
{
// Check for number of subfiles if no content
if (!content) {
apr_hash_t *entries;
SVN_ERR(svn_fs_dir_entries(&entries, fs_root, key, pool));
// Return if any subfiles
if (apr_hash_count(entries)!=0) {
return EXIT_FAILURE;
}
}
// Add gitignore-File
QString gitIgnorePath = path + ".gitignore";
if (content) {
QIODevice *io = txn->addFile(gitIgnorePath, 33188, strlen(content));
io->write(content);
io->putChar('\n');
} else {
QIODevice *io = txn->addFile(gitIgnorePath, 33188, 0);
io->putChar('\n');
}
return EXIT_SUCCESS;
}
int SvnRevision::fetchIgnoreProps(QString *ignore, apr_pool_t *pool, const char *key, svn_fs_root_t *fs_root)
{
// Get svn:ignore
svn_string_t *prop = NULL;
SVN_ERR(svn_fs_node_prop(&prop, fs_root, key, "svn:ignore", pool));
if (prop) {
*ignore = QString(prop->data);
} else {
*ignore = QString();
}
return EXIT_SUCCESS;
}
int SvnRevision::fetchUnknownProps(apr_pool_t *pool, const char *key, svn_fs_root_t *fs_root)
{
// Check all properties
apr_hash_t *table;
SVN_ERR(svn_fs_node_proplist(&table, fs_root, key, pool));
apr_hash_index_t *hi;
void *propVal;
const void *propKey;
for (hi = apr_hash_first(pool, table); hi; hi = apr_hash_next(hi)) {
apr_hash_this(hi, &propKey, NULL, &propVal);
if (strcmp((char*)propKey, "svn:ignore")!=0) {
qWarning() << "WARN: Unknown svn-property" << (char*)propKey << "set to" << ((svn_string_t*)propVal)->data << "for" << key;
}
}
return EXIT_SUCCESS;
}
+1
View File
@@ -36,6 +36,7 @@ foreach(ITEM ${dlists})
CMAKEFILES(${dlist})
endforeach(ITEM ${dlists})
# For those wanting to use a system version of the LEMON parser
# generator from sqlite, remember that the presence of /usr/bin/lemon
# is not enough. LEMON needs a template file, lempar.c, and by
-1
View File
@@ -67,7 +67,6 @@ set(COREINTERFACE_SOURCES
../../../../rt^3/src/coreInterface/Combination.cpp
../../../../rt^3/src/coreInterface/Cone.cpp
../../../../rt^3/src/coreInterface/ConstDatabase.cpp
../../../../rt^3/src/coreInterface/BagOfTriangles.cpp
../../../../rt^3/src/coreInterface/Database.cpp
../../../../rt^3/src/coreInterface/Ellipsoid.cpp
../../../../rt^3/src/coreInterface/EllipticalTorus.cpp
+1 -1
View File
@@ -24,7 +24,7 @@ execute_process(COMMAND "@CMAKE_COMMAND@" -E tar xjf "${CSDIR}/hawaii-c.tar.bz2"
execute_process(COMMAND "${DEMG}" "${CBDIR}/hawaii-c" OUTPUT_VARIABLE dem_g_log ERROR_VARIABLE dem_g_log)
file(WRITE "${CBDIR}/regress-dem.log" "${dem_g_log}")
# Known "good" md5sum of output for comparison
# Known "good" md5sum of output for comparision
set(EXPECTED_MD5 "cf87c3b174840f18f5653c677af1f433")
# get and clean up md5sum from generated output

Some files were not shown because too many files have changed in this diff Show More