[brlcad-commits] SF.net SVN: brlcad:[54318] brlcad/trunk/src/tclscripts/archer

2013-02-06 Thread bob1961
Revision: 54318
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54318view=rev
Author:   bob1961
Date: 2013-02-06 13:25:29 + (Wed, 06 Feb 2013)
Log Message:
---
Updated the moveElement methods for moving ARB edges (i.e. use a view_z 
calculated using edge vertices instead of from the arb's center).

Modified Paths:
--
brlcad/trunk/src/tclscripts/archer/Arb5EditFrame.tcl
brlcad/trunk/src/tclscripts/archer/Arb6EditFrame.tcl
brlcad/trunk/src/tclscripts/archer/Arb7EditFrame.tcl
brlcad/trunk/src/tclscripts/archer/Arb8EditFrame.tcl

Modified: brlcad/trunk/src/tclscripts/archer/Arb5EditFrame.tcl
===
--- brlcad/trunk/src/tclscripts/archer/Arb5EditFrame.tcl2013-02-05 
21:13:40 UTC (rev 54317)
+++ brlcad/trunk/src/tclscripts/archer/Arb5EditFrame.tcl2013-02-06 
13:25:29 UTC (rev 54318)
@@ -618,6 +618,46 @@
 
 ::itcl::body Arb5EditFrame::moveElement {_dm _obj _vx _vy _ocenter} {
 switch -- $mEditMode \
+   $moveEdge12 {
+   set ptA [$itk_option(-mged) get $_obj V1]
+   set ptB [$itk_option(-mged) get $_obj V2]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge23 {
+   set ptA [$itk_option(-mged) get $_obj V2]
+   set ptB [$itk_option(-mged) get $_obj V3]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge34 {
+   set ptA [$itk_option(-mged) get $_obj V3]
+   set ptB [$itk_option(-mged) get $_obj V4]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge14 {
+   set ptA [$itk_option(-mged) get $_obj V1]
+   set ptB [$itk_option(-mged) get $_obj V4]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge15 {
+   set ptA [$itk_option(-mged) get $_obj V1]
+   set ptB [$itk_option(-mged) get $_obj V5]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge25 {
+   set ptA [$itk_option(-mged) get $_obj V2]
+   set ptB [$itk_option(-mged) get $_obj V5]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge35 {
+   set ptA [$itk_option(-mged) get $_obj V3]
+   set ptB [$itk_option(-mged) get $_obj V5]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge45 {
+   set ptA [$itk_option(-mged) get $_obj V4]
+   set ptB [$itk_option(-mged) get $_obj V5]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
$movePoint5 {
set pt [$itk_option(-mged) get $_obj V5]
} \

Modified: brlcad/trunk/src/tclscripts/archer/Arb6EditFrame.tcl
===
--- brlcad/trunk/src/tclscripts/archer/Arb6EditFrame.tcl2013-02-05 
21:13:40 UTC (rev 54317)
+++ brlcad/trunk/src/tclscripts/archer/Arb6EditFrame.tcl2013-02-06 
13:25:29 UTC (rev 54318)
@@ -676,6 +676,46 @@
 
 ::itcl::body Arb6EditFrame::moveElement {_dm _obj _vx _vy _ocenter} {
 switch -- $mEditMode \
+   $moveEdge12 {
+   set ptA [$itk_option(-mged) get $_obj V1]
+   set ptB [$itk_option(-mged) get $_obj V2]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge23 {
+   set ptA [$itk_option(-mged) get $_obj V2]
+   set ptB [$itk_option(-mged) get $_obj V3]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge34 {
+   set ptA [$itk_option(-mged) get $_obj V3]
+   set ptB [$itk_option(-mged) get $_obj V4]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge14 {
+   set ptA [$itk_option(-mged) get $_obj V1]
+   set ptB [$itk_option(-mged) get $_obj V4]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge15 {
+   set ptA [$itk_option(-mged) get $_obj V1]
+   set ptB [$itk_option(-mged) get $_obj V5]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge25 {
+   set ptA [$itk_option(-mged) get $_obj V2]
+   set ptB [$itk_option(-mged) get $_obj V5]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge36 {
+   set ptA [$itk_option(-mged) get $_obj V3]
+   set ptB [$itk_option(-mged) get $_obj V6]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
+   $moveEdge46 {
+   set ptA [$itk_option(-mged) get $_obj V4]
+   set ptB [$itk_option(-mged) get $_obj V6]
+   set pt [::vscale [vadd2 $ptA $ptB] 0.5]
+   } \
$movePoint5 {
set pt [$itk_option(-mged) get $_obj V5]
} \

Modified: brlcad/trunk/src/tclscripts/archer/Arb7EditFrame.tcl
===
--- brlcad/trunk/src/tclscripts/archer/Arb7EditFrame.tcl2013-02-05 
21:13:40 UTC (rev 

[brlcad-commits] SF.net SVN: brlcad:[54319] brlcad/trunk/src/tclscripts/archer/PipeEditFrame .tcl

2013-02-06 Thread bob1961
Revision: 54319
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54319view=rev
Author:   bob1961
Date: 2013-02-06 14:21:16 + (Wed, 06 Feb 2013)
Log Message:
---
Tighten up the display of edit options for the pipe edit panel.

Modified Paths:
--
brlcad/trunk/src/tclscripts/archer/PipeEditFrame.tcl

Modified: brlcad/trunk/src/tclscripts/archer/PipeEditFrame.tcl
===
--- brlcad/trunk/src/tclscripts/archer/PipeEditFrame.tcl2013-02-06 
13:25:29 UTC (rev 54318)
+++ brlcad/trunk/src/tclscripts/archer/PipeEditFrame.tcl2013-02-06 
14:21:16 UTC (rev 54319)
@@ -78,6 +78,7 @@
 protected {
variable mDetail
variable mCurrentPipePoint 1
+   variable mPrevPipeObject 
 
# Methods used by the constructor
# override methods in GeometryEditFrame
@@ -168,9 +169,9 @@
 
 GeometryEditFrame::initGeometry $gdata
 
-if {$itk_option(-geometryObject) != $mPrevGeometryObject} {
+if {$itk_option(-geometryObject) != $mPrevPipeObject} {
set mCurrentPipePoint 1
-   set mPrevGeometryObject $itk_option(-geometryObject)
+   set mPrevPipeObject $itk_option(-geometryObject)
 }
 pipePointSelectCallback [expr {$mCurrentPipePoint - 1}]
 }
@@ -309,21 +310,18 @@
 
 ::itcl::body PipeEditFrame::buildLowerPanel {} {
 set parent [$this childsite lower]
-set i 1
+set row 1
 foreach label $mEditLabels {
-   itk_component add editRB$i {
-   ::ttk::radiobutton $parent.editRB$i \
+   itk_component add editRB$row {
+   ::ttk::radiobutton $parent.editRB$row \
-variable [::itcl::scope mEditMode] \
-   -value $i \
+   -value $row \
-text $label \
-command [::itcl::code $this initEditState]
} {}
 
-   pack $itk_component(editRB$i) \
-   -anchor w \
-   -expand yes
-
-   incr i
+   grid $itk_component(editRB$row) -row $row -column 0 -sticky nsew
+   incr row
 }
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54320] brlcad/trunk/TODO

2013-02-06 Thread brlcad
Revision: 54320
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54320view=rev
Author:   brlcad
Date: 2013-02-06 15:08:20 + (Wed, 06 Feb 2013)
Log Message:
---
need to fix dbupgrade from within mged, now that v4 are made read-only when 
flipped

Modified Paths:
--
brlcad/trunk/TODO

Modified: brlcad/trunk/TODO
===
--- brlcad/trunk/TODO   2013-02-06 14:21:16 UTC (rev 54319)
+++ brlcad/trunk/TODO   2013-02-06 15:08:20 UTC (rev 54320)
@@ -42,6 +42,10 @@
 THESE ARE UNSCHEDULED BACKLOG TASKS
 ---
 
+* mged's dbupgrade command is useless, fix it.
+
+* merge conv-vg2g into dbupgrade
+
 * add the ability for search to filter objects based on whether
   they are being unioned, intersected or subtracted from a parent
 
@@ -543,8 +547,6 @@
 * add support for a custom unit conversion factor to the units command
   (e.g. 'units 9.3120223' or 'units metertons 9.3120223')
 
-* merge conv-vg2g into dbupgrade
-
 * usage statistics.  similar to the eclipse Usage Data Collector, keep
   track of which BRL-CAD command-line commands and MGED/libged
   commands are run.  Give the user the option of uploading those

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54323] brlcad/trunk/TODO

2013-02-06 Thread brlcad
Revision: 54323
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54323view=rev
Author:   brlcad
Date: 2013-02-06 17:03:22 + (Wed, 06 Feb 2013)
Log Message:
---
must test dbupgrade

Modified Paths:
--
brlcad/trunk/TODO

Modified: brlcad/trunk/TODO
===
--- brlcad/trunk/TODO   2013-02-06 17:02:34 UTC (rev 54322)
+++ brlcad/trunk/TODO   2013-02-06 17:03:22 UTC (rev 54323)
@@ -18,6 +18,8 @@
 THESE TASKS SHOULD HAPPEN BEFORE THE NEXT RELEASE
 -
 
+* test dbupgrade from within mged (spaces in name and permissions)
+
 * test arbn v5 import/export (make sure plane equations are not
   corrupted).
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54324] brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl

2013-02-06 Thread brlcad
Revision: 54324
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54324view=rev
Author:   brlcad
Date: 2013-02-06 17:15:13 + (Wed, 06 Feb 2013)
Log Message:
---
shame on me for using a platform check.  unnecessary since we can just catch 
the error and try again.  lil bit shorter even.

Modified Paths:
--
brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl

Modified: brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl
===
--- brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl  2013-02-06 17:03:22 UTC 
(rev 54323)
+++ brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl  2013-02-06 17:15:13 UTC 
(rev 54324)
@@ -271,19 +271,18 @@
 file rename -force $dbname $db_orig
 
 # get file permissions from original
-if {$::tcl_platform(platform) eq {windows} } {
+if {catch {set perms [file attributes $db_orig -permissions]}} {
# windows doesn't understand -permissions
-   set perms [file attributes $db_orig -readonly]
-} else {
-   set perms [file attributes $db_orig -permissions]
+   if {catch {set perms [file attributes $db_orig -readonly]}} {
+   # wtf
+   set perms 0
+   }
 }
 
 # make original read-only
-if {$::tcl_platform(platform) eq {windows} } {
+if {catch {file attributes $db_orig -permissions 0440}} {
# windows doesn't understand -permissions
-   file attributes $db_orig -readonly 1
-} else {
-   file attributes $db_orig -permissions 0440
+   catch {file attributes $db_orig -readonly 1} result
 }
 
 # dbupgrade converts the original database to the current db format
@@ -301,18 +300,16 @@
 }
 
 # set file permissions to match original state
-if {$::tcl_platform(platform) eq {windows} } {
+if {catch {file attributes $dbname -permissions $perms}} {
# windows doesn't understand -permissions
-   file attributes $dbname -readonly $perms
-} else {
-   file attributes $dbname -permissions $perms
+   catch {file attributes $dbname -readonly $perms} result
 }
 
 # reopen original or new db
 opendb $dbname y
 
 # remove tmp file
-file delete $tmp_dbname
+catch {file delete $tmp_dbname} result
 
 unset dbupgrade_priv(dbname)
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54325] brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl

2013-02-06 Thread brlcad
Revision: 54325
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54325view=rev
Author:   brlcad
Date: 2013-02-06 17:16:02 + (Wed, 06 Feb 2013)
Log Message:
---
no point stashing the result if we don't use it

Modified Paths:
--
brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl

Modified: brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl
===
--- brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl  2013-02-06 17:15:13 UTC 
(rev 54324)
+++ brlcad/trunk/src/tclscripts/mged/dbupgrade.tcl  2013-02-06 17:16:02 UTC 
(rev 54325)
@@ -282,7 +282,7 @@
 # make original read-only
 if {catch {file attributes $db_orig -permissions 0440}} {
# windows doesn't understand -permissions
-   catch {file attributes $db_orig -readonly 1} result
+   catch {file attributes $db_orig -readonly 1}
 }
 
 # dbupgrade converts the original database to the current db format
@@ -302,14 +302,14 @@
 # set file permissions to match original state
 if {catch {file attributes $dbname -permissions $perms}} {
# windows doesn't understand -permissions
-   catch {file attributes $dbname -readonly $perms} result
+   catch {file attributes $dbname -readonly $perms}
 }
 
 # reopen original or new db
 opendb $dbname y
 
 # remove tmp file
-catch {file delete $tmp_dbname} result
+catch {file delete $tmp_dbname}
 
 unset dbupgrade_priv(dbname)
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54326] brlcad/trunk/NEWS

2013-02-06 Thread brlcad
Revision: 54326
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54326view=rev
Author:   brlcad
Date: 2013-02-06 17:19:39 + (Wed, 06 Feb 2013)
Log Message:
---
reported by user josh baker, fix a problem with the dbupgrade mged tcl command. 
 it was never tested on windows so there were several problems, most notably a 
'file attributes' -permissions error that prevented the upgrade from starting.  
there was also no accommodation for spaces in file names and it was using a 
windows-problematic \R4 file name suffix.

Revision Links:
--
http://brlcad.svn.sourceforge.net/brlcad/?rev=4view=rev

Modified Paths:
--
brlcad/trunk/NEWS

Modified: brlcad/trunk/NEWS
===
--- brlcad/trunk/NEWS   2013-02-06 17:16:02 UTC (rev 54325)
+++ brlcad/trunk/NEWS   2013-02-06 17:19:39 UTC (rev 54326)
@@ -13,6 +13,7 @@
 --- 2012-07-XX  Release 7.22.2 ---
 --
 
+* fixed mged 'dbupgrade' -permissions error on windows - Sean Morrison
 * fixed infinite loop raytracing subtracted lights - Sean Morrison
 * added hyp centroid and volume output to 'analyze' - Aaron Keesing
 * fixed random number SMP bug affecting rt and adrt - Sean Morrison

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54327] brlcad/trunk/src/other/libvds/cluster.c

2013-02-06 Thread n_reed
Revision: 54327
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54327view=rev
Author:   n_reed
Date: 2013-02-06 22:21:32 + (Wed, 06 Feb 2013)
Log Message:
---
remove a noisy info message

Modified Paths:
--
brlcad/trunk/src/other/libvds/cluster.c

Modified: brlcad/trunk/src/other/libvds/cluster.c
===
--- brlcad/trunk/src/other/libvds/cluster.c 2013-02-06 17:19:39 UTC (rev 
54326)
+++ brlcad/trunk/src/other/libvds/cluster.c 2013-02-06 22:21:32 UTC (rev 
54327)
@@ -58,7 +58,7 @@
 VEC3_SCALE(average, 1.0 / (float) nnodes, average);
 VEC3_AVERAGE(center, min, max);
 if (VEC3_EQUAL(min, max)) {
-   printf(Coincident vertices; partitioning among child nodes.\n);
+   /* vertices coincide, just partition evenly among children */
for (i = 0; i  nnodes; i++) {
int index = i % VDS_MAXDEGREE;
childnodes[index][nchildnodes[index]] = nodes[i];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54328] brlcad/trunk/src/shapes/coil.c

2013-02-06 Thread carlmoore
Revision: 54328
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54328view=rev
Author:   carlmoore
Date: 2013-02-06 22:31:07 + (Wed, 06 Feb 2013)
Log Message:
---
add a Usage: statement when an illegal option is detected

Modified Paths:
--
brlcad/trunk/src/shapes/coil.c

Modified: brlcad/trunk/src/shapes/coil.c
===
--- brlcad/trunk/src/shapes/coil.c  2013-02-06 22:21:32 UTC (rev 54327)
+++ brlcad/trunk/src/shapes/coil.c  2013-02-06 22:31:07 UTC (rev 54328)
@@ -382,6 +382,9 @@
break;
default:
bu_log(%s: illegal option -- %c\n, bu_getprogname(), c);
+   bu_log(Usage: coil [-d mean_outer_diameter] [-w wire_diameter] 
[-h helix_angle] [-p pitch]\n);
+   bu_log([-n number_of_turns] [-s start_cap_type] 
[-e end_cap_type]\n);
+   bu_log([-S coil_data_structure] [-l 
overall_length] [-L]\n);
bu_exit(EXIT_SUCCESS, NULL);
}
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54329] brlcad/trunk/src/librt/primitives/bot/bot.c

2013-02-06 Thread carlmoore
Revision: 54329
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54329view=rev
Author:   carlmoore
Date: 2013-02-06 22:31:51 + (Wed, 06 Feb 2013)
Log Message:
---
change lu to d to fix format warnings

Modified Paths:
--
brlcad/trunk/src/librt/primitives/bot/bot.c

Modified: brlcad/trunk/src/librt/primitives/bot/bot.c
===
--- brlcad/trunk/src/librt/primitives/bot/bot.c 2013-02-06 22:31:07 UTC (rev 
54328)
+++ brlcad/trunk/src/librt/primitives/bot/bot.c 2013-02-06 22:31:51 UTC (rev 
54329)
@@ -1880,7 +1880,7 @@
  V3ARGS(bot-vertices[i*3]));
bu_vls_strcat(logstr, } F {);
for (i = 0; i  bot-num_faces; i++)
-   bu_vls_printf(logstr,  { %lu %lu %lu },
+   bu_vls_printf(logstr,  { %d %d %d },
  V3ARGS(bot-faces[i*3]));
bu_vls_strcat(logstr, });
if (bot-mode == RT_BOT_PLATE || bot-mode == RT_BOT_PLATE_NOCOS) {
@@ -1897,7 +1897,7 @@
}
bu_vls_printf(logstr, } fn {);
for (i = 0; i  bot-num_faces; i++) {
-   bu_vls_printf(logstr,  { %lu %lu %lu }, 
V3ARGS(bot-face_normals[i*3]));
+   bu_vls_printf(logstr,  { %d %d %d }, 
V3ARGS(bot-face_normals[i*3]));
}
bu_vls_printf(logstr, });
}
@@ -1926,7 +1926,7 @@
} else if (!bu_strncmp(attr, fn, 2)) {
if (attr[2] == '\0') {
for (i = 0; i  bot-num_faces; i++) {
-   bu_vls_printf(logstr,  { %lu %lu %lu }, 
V3ARGS(bot-face_normals[i*3]));
+   bu_vls_printf(logstr,  { %d %d %d }, 
V3ARGS(bot-face_normals[i*3]));
}
status = BRLCAD_OK;
} else {
@@ -1935,7 +1935,7 @@
bu_vls_printf(logstr, Specified face index [%ld] is out of 
range, li);
status = BRLCAD_ERROR;
} else {
-   bu_vls_printf(logstr, %lu %lu %lu, 
V3ARGS(bot-face_normals[li*3]));
+   bu_vls_printf(logstr, %d %d %d, 
V3ARGS(bot-face_normals[li*3]));
status = BRLCAD_OK;
}
}
@@ -1994,7 +1994,7 @@
/* Retrieve one face, as vertex indices */
if (attr[1] == '\0') {
for (i = 0; i  bot-num_faces; i++)
-   bu_vls_printf(logstr,  { %lu %lu %lu },
+   bu_vls_printf(logstr,  { %d %d %d },
  V3ARGS(bot-faces[i*3]));
status = BRLCAD_OK;
} else {
@@ -2003,7 +2003,7 @@
bu_vls_printf(logstr, face number [%ld] out of range 
(0..%zu), li, bot-num_faces-1);
status = BRLCAD_ERROR;
} else {
-   bu_vls_printf(logstr, %lu %lu %lu,
+   bu_vls_printf(logstr, %d %d %d,
  V3ARGS(bot-faces[li*3]));
status = BRLCAD_OK;
}

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54330] brlcad/trunk

2013-02-06 Thread n_reed
Revision: 54330
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54330view=rev
Author:   n_reed
Date: 2013-02-06 22:40:43 + (Wed, 06 Feb 2013)
Log Message:
---
Make it possible to run adaptive plot routines from mged for rudimentary 
testing purposes. Running 'rset var adaptive_plot 1' causes adaptive routines 
to be called when calculating plots.

Modified Paths:
--
brlcad/trunk/include/ged.h
brlcad/trunk/src/libged/draw.c
brlcad/trunk/src/mged/attach.c
brlcad/trunk/src/mged/mged_dm.h
brlcad/trunk/src/mged/set.c

Modified: brlcad/trunk/include/ged.h
===
--- brlcad/trunk/include/ged.h  2013-02-06 22:31:51 UTC (rev 54329)
+++ brlcad/trunk/include/ged.h  2013-02-06 22:40:43 UTC (rev 54330)
@@ -531,6 +531,7 @@
 struct ged_other_state gv_view_params;
 struct ged_other_state gv_view_scale;
 struct ged_rect_state  gv_rect;
+intgv_adaptive_plot;
 };
 
 

Modified: brlcad/trunk/src/libged/draw.c
===
--- brlcad/trunk/src/libged/draw.c  2013-02-06 22:31:51 UTC (rev 54329)
+++ brlcad/trunk/src/libged/draw.c  2013-02-06 22:40:43 UTC (rev 54330)
@@ -553,10 +553,12 @@
 static union tree *
 wireframe_leaf(struct db_tree_state *tsp, const struct db_full_path *pathp, 
struct rt_db_internal *ip, genptr_t client_data)
 {
+int plot_status;
 union tree *curtree;
 struct bu_list vhead;
 struct solid *sp, *curr_sp;
 struct _ged_client_data *dgcdp = (struct _ged_client_data *)client_data;
+struct ged_view *gvp;
 
 RT_CK_DB_INTERNAL(ip);
 RT_CK_TESS_TOL(tsp-ts_ttol);
@@ -591,9 +593,30 @@
 /* calculate plot */
 BU_LIST_INIT(vhead);
 
-if (!ip-idb_meth-ft_plot
-   || ip-idb_meth-ft_plot(vhead, ip, tsp-ts_ttol, tsp-ts_tol, NULL)  
0)
-{
+plot_status = -1;
+gvp = dgcdp-gedp-ged_gvp;
+if (gvp-gv_adaptive_plot  ip-idb_meth-ft_adaptive_plot) {
+   struct rt_view_info info;
+
+   info.vhead = vhead;
+   info.tol = tsp-ts_tol;
+
+   info.point_spacing = sp-s_size / 16.0;
+   info.curve_spacing = sp-s_size / 2.0;
+
+   if (ip-idb_minor_type == ID_BOT) {
+   struct rt_bot_internal *bot = (struct rt_bot_internal *)ip-idb_ptr;
+
+   info.point_spacing = sp-s_size / (bot-num_faces / 12.0);
+   }
+
+   plot_status = ip-idb_meth-ft_adaptive_plot(ip, info);
+} else if (ip-idb_meth-ft_plot) {
+   plot_status = ip-idb_meth-ft_plot(vhead, ip, tsp-ts_ttol,
+   tsp-ts_tol, NULL);
+}
+
+if (plot_status  0) {
bu_vls_printf(dgcdp-gedp-ged_result_str, %s: plot failure\n,
DB_FULL_PATH_CUR_DIR(pathp)-d_namep);
 

Modified: brlcad/trunk/src/mged/attach.c
===
--- brlcad/trunk/src/mged/attach.c  2013-02-06 22:31:51 UTC (rev 54329)
+++ brlcad/trunk/src/mged/attach.c  2013-02-06 22:40:43 UTC (rev 54330)
@@ -753,6 +753,7 @@
 BU_GET(view_state-vs_gvp, struct ged_view);
 *view_state-vs_gvp = *initial_dm_list-dml_view_state-vs_gvp;/* 
struct copy */
 view_state-vs_gvp-gv_clientData = (genptr_t)view_state;
+view_state-vs_gvp-gv_adaptive_plot = 0;
 view_state-vs_rc = 1;
 view_ring_init(curr_dm_list-dml_view_state, (struct _view_state *)NULL);
 

Modified: brlcad/trunk/src/mged/mged_dm.h
===
--- brlcad/trunk/src/mged/mged_dm.h 2013-02-06 22:31:51 UTC (rev 54329)
+++ brlcad/trunk/src/mged/mged_dm.h 2013-02-06 22:40:43 UTC (rev 54330)
@@ -154,6 +154,7 @@
 char   mv_union_lexeme[1024];
 char   mv_intersection_lexeme[1024];
 char   mv_difference_lexeme[1024];
+intmv_adaptive_plot;
 };
 
 

Modified: brlcad/trunk/src/mged/set.c
===
--- brlcad/trunk/src/mged/set.c 2013-02-06 22:31:51 UTC (rev 54329)
+++ brlcad/trunk/src/mged/set.c 2013-02-06 22:40:43 UTC (rev 54330)
@@ -41,6 +41,7 @@
 
 extern void set_perspective(void);
 
+static void set_adaptive_plot(void);
 static void set_dirty_flag(void);
 static void nmg_eu_dist_set(void);
 static void set_dlist(void);
@@ -92,7 +93,8 @@
 /* mv_eye_sep_dist */  0.0,
 /* mv_union lexeme */  u,
 /* mv_intersection lexeme */n,
-/* mv_difference lexeme */ -
+/* mv_difference lexeme */ -,
+/* mv_adaptive_plot */ 0
 };
 
 
@@ -130,9 +132,15 @@
 {%s, LINE, union_op,   MV_O(mv_union_lexeme),  
BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
 {%s, LINE, intersection_op,
MV_O(mv_intersection_lexeme),BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
 {%s, LINE, difference_op,  MV_O(mv_difference_lexeme), 
BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+{%d, 1, adaptive_plot, MV_O(mv_adaptive_plot), 

[brlcad-commits] SF.net SVN: brlcad:[54331] brlcad/trunk/src/anim/anim_hardtrack.c

2013-02-06 Thread carlmoore
Revision: 54331
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54331view=rev
Author:   carlmoore
Date: 2013-02-06 23:04:08 + (Wed, 06 Feb 2013)
Log Message:
---
add newline

Modified Paths:
--
brlcad/trunk/src/anim/anim_hardtrack.c

Modified: brlcad/trunk/src/anim/anim_hardtrack.c
===
--- brlcad/trunk/src/anim/anim_hardtrack.c  2013-02-06 22:40:43 UTC (rev 
54330)
+++ brlcad/trunk/src/anim/anim_hardtrack.c  2013-02-06 23:04:08 UTC (rev 
54331)
@@ -345,7 +345,7 @@
 MAT_IDN(m_rev_axes);
 
 if (!get_args(argc, argv)) {
-   fprintf(stderr, anim_hardtrack: argument error.);
+   fprintf(stderr, anim_hardtrack: argument error.\n);
return -1;
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54332] brlcad/trunk/TODO

2013-02-06 Thread brlcad
Revision: 54332
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54332view=rev
Author:   brlcad
Date: 2013-02-06 23:16:55 + (Wed, 06 Feb 2013)
Log Message:
---
csv export support, plus more converter task consolidation

Modified Paths:
--
brlcad/trunk/TODO

Modified: brlcad/trunk/TODO
===
--- brlcad/trunk/TODO   2013-02-06 23:04:08 UTC (rev 54331)
+++ brlcad/trunk/TODO   2013-02-06 23:16:55 UTC (rev 54332)
@@ -111,15 +111,6 @@
 * make libbn/plot3.c functions parallel-safe so callers do not have to
   manually wrap with bu_semaphore_acquire().
 
-* implement 3dm-g support for ON_InstanceRef entities.  These are
-  instances of existing geometry that have prescribed referencing edit
-  behavior and can have their own matrices.  Basically, they're combs
-  that should sometimes reference copies of geometry and sometimes not
-  (there's a flag).  unveiled via sf bug report 3575774 where the
-  geometry export from solidworks was predominantly references
-  resulting in a load of geometry missing after import and objects in
-  the wrong position.
-
 * fix ged 'joint' command, need to figure out how libged should handle
   non-object additions to the wireframe (or maybe they should be
   objects, but not mged's faked solids ala cvt_vlblock_to_solids()).
@@ -476,8 +467,6 @@
 * deprecate dbcp and merge functionality (and improved
   double-buffering) with the buffer tool.
 
-* make the converters export all top-level objects by default
-
 * rename all the g_* tools sans _ [save until 7.22]
 
 * vls name wrapping (reversible argv-to-vls, vls-to-argv).  look at
@@ -973,8 +962,6 @@
 
 * give bot-bldxf the axe (reconcile and merge with bot_dump)
 
-* implement support for exporting sketch objects via g-iges
-
 * implement mged object name globbing similar to tclsh's globbing
   (i.e. via a globbing command and quoting globs that use []).  testing
   shows db_glob doesn't seem to behave correctly, at least not like
@@ -1050,9 +1037,6 @@
 * preserve an arb8 as an arb8 (instead of writing as arb6 or arb5) and
   similarly for the other arb# sizes
 
-* validate primitives during export so that it is guaranteed that
-  illegal primitives will not be written to file
-
 * implement a region anointment command where the user can turn an
   assembly into a region and change all lower or higher regions into
   combinations
@@ -1171,8 +1155,6 @@
 * investigate why g-iges followed by iges-g on a single box results in
   permuted vertex lists
 
-* add xml, nff, bzw, pov, blend geometry import and export support
-
 * add support for filesystem-based geometry collections
 
 * add missing manual pages (jra generated list on 04.2007):
@@ -1408,6 +1390,24 @@
 CONVERTERS
 --
 
+* implement 3dm-g support for ON_InstanceRef entities.  These are
+  instances of existing geometry that have prescribed referencing edit
+  behavior and can have their own matrices.  Basically, they're combs
+  that should sometimes reference copies of geometry and sometimes not
+  (there's a flag).  unveiled via sf bug report 3575774 where the
+  geometry export from solidworks was predominantly references
+  resulting in a load of geometry missing after import and objects in
+  the wrong position.
+
+* make the converters export all top-level objects by default
+
+* implement support for exporting sketch objects via g-iges
+
+* validate primitives during export so that it is guaranteed that
+  illegal primitives will not be written to file
+
+* add csv, xml, nff, bzw, pov, blend geometry import and export support
+
 * finish obj-g importer.  need to test more inputs and make sure all
   geometry is preserved on import in some form.  make sure new libobj
   parser works and is integrated with new front-end.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54333] brlcad/trunk/src/other/libvds/stdvds.c

2013-02-06 Thread starseeker
Revision: 54333
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54333view=rev
Author:   starseeker
Date: 2013-02-07 00:33:58 + (Thu, 07 Feb 2013)
Log Message:
---
Add _USE_MATH_DEFINES for definition of M_PI on Windows

Modified Paths:
--
brlcad/trunk/src/other/libvds/stdvds.c

Modified: brlcad/trunk/src/other/libvds/stdvds.c
===
--- brlcad/trunk/src/other/libvds/stdvds.c  2013-02-06 23:16:55 UTC (rev 
54332)
+++ brlcad/trunk/src/other/libvds/stdvds.c  2013-02-07 00:33:58 UTC (rev 
54333)
@@ -9,6 +9,10 @@
  * @seestdvds.c
  */
 /*@{*/
+
+/* For M_PI on Windows */
+#define _USE_MATH_DEFINES
+
 #include math.h
 #include assert.h
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[54334] brlcad/trunk/src

2013-02-06 Thread starseeker
Revision: 54334
  http://brlcad.svn.sourceforge.net/brlcad/?rev=54334view=rev
Author:   starseeker
Date: 2013-02-07 01:44:33 + (Thu, 07 Feb 2013)
Log Message:
---
Take a stab at getting the libvds additions building on Windows.  Functionality 
is untested as  yet, but this seems to get the build working again.

Modified Paths:
--
brlcad/trunk/src/librt/CMakeLists.txt
brlcad/trunk/src/other/libvds/CMakeLists.txt
brlcad/trunk/src/other/libvds/vds.h

Modified: brlcad/trunk/src/librt/CMakeLists.txt
===
--- brlcad/trunk/src/librt/CMakeLists.txt   2013-02-07 00:33:58 UTC (rev 
54333)
+++ brlcad/trunk/src/librt/CMakeLists.txt   2013-02-07 01:44:33 UTC (rev 
54334)
@@ -285,6 +285,10 @@
   set(LIBRT_SOURCES ${LIBRT_SOURCES} timer42.c)
 endif(MSVC)
 
+if(CPP_DLL_DEFINES)
+  list(APPEND librt_DEFINES VDS_DLL_IMPORTS)
+endif(CPP_DLL_DEFINES)
+
 BRLCAD_ADDLIB(librt ${LIBRT_SOURCES} 
${LIBVDS_LIBRARY};libbn;libbu;${OPENNURBS_LIBRARY};libnurbs;${REGEX_LIBRARY};${ZLIB_LIBRARY};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}
 NOSTRICTCXX)
 if(BUILD_STATIC_LIBS)
   SET_PROPERTY(TARGET librt-static APPEND PROPERTY COMPILE_DEFINITIONS 
OBJ_BREP=1)
@@ -297,6 +301,7 @@
 
   if(BRLCAD_BUILD_STATIC_LIBS AND BRLCAD_ENABLE_BRLCAD_LIBRARY)
 SET_PROPERTY(TARGET librt-static APPEND PROPERTY COMPILE_DEFINITIONS 
ON_DLL_IMPORTS)
+SET_PROPERTY(TARGET librt-static APPEND PROPERTY COMPILE_DEFINITIONS 
VDS_DLL_IMPORTS)
   endif(BRLCAD_BUILD_STATIC_LIBS AND BRLCAD_ENABLE_BRLCAD_LIBRARY)
 endif(CPP_DLL_DEFINES)
 

Modified: brlcad/trunk/src/other/libvds/CMakeLists.txt
===
--- brlcad/trunk/src/other/libvds/CMakeLists.txt2013-02-07 00:33:58 UTC 
(rev 54333)
+++ brlcad/trunk/src/other/libvds/CMakeLists.txt2013-02-07 01:44:33 UTC 
(rev 54334)
@@ -136,6 +136,10 @@
 ## Note that assertions are suppressed when VDS_DEBUGPRINT is not defined
 #add_definitions(-DVDS_DEBUGPRINT)
 
+if(MSVC)
+   add_definitions(-DVDS_DLL_EXPORTS)
+endif(MSVC)
+
 add_library(libvds SHARED ${CORE_SRCS})
 
 install(TARGETS libvds

Modified: brlcad/trunk/src/other/libvds/vds.h
===
--- brlcad/trunk/src/other/libvds/vds.h 2013-02-07 00:33:58 UTC (rev 54333)
+++ brlcad/trunk/src/other/libvds/vds.h 2013-02-07 01:44:33 UTC (rev 54334)
@@ -27,6 +27,18 @@
 extern C {
 #endif
 
+#ifndef VDS_EXPORT
+#  if defined(VDS_DLL_EXPORTS)  defined(VDS_DLL_IMPORTS)
+#error Only VDS_DLL_EXPORTS or VDS_DLL_IMPORTS can be defined, not both.
+#  elif defined(VDS_DLL_EXPORTS)
+#define VDS_EXPORT __declspec(dllexport)
+#  elif defined(VDS_DLL_IMPORTS)
+#define VDS_EXPORT __declspec(dllimport)
+#  else
+#define VDS_EXPORT
+#  endif
+#endif
+
 #include stdio.h
 
 /** VDS_MAXDEGREE defines the maximum degree of vertex tree nodes  */
@@ -172,44 +184,44 @@
  */
 
 /* Routines for maintaining the vertex tree (dynamic.c) */
-extern void vdsAdjustTreeBoundary(vdsNode *, vdsFoldCriterion, void *);
-extern void vdsAdjustTreeTopDown(vdsNode *, vdsFoldCriterion, void *);
+VDS_EXPORT extern void vdsAdjustTreeBoundary(vdsNode *, vdsFoldCriterion, void 
*);
+VDS_EXPORT extern void vdsAdjustTreeTopDown(vdsNode *, vdsFoldCriterion, void 
*);
 /* Low-level vertex tree maintainance routines; not need by most users: */
-extern void vdsFoldNode(vdsNode *);
-extern void vdsUnfoldNode(vdsNode *);
-extern void vdsFoldSubtree(vdsNode *);
+VDS_EXPORT extern void vdsFoldNode(vdsNode *);
+VDS_EXPORT extern void vdsUnfoldNode(vdsNode *);
+VDS_EXPORT extern void vdsFoldSubtree(vdsNode *);
 
 /* Routines for rendering the vertex tree (render.c) */
-extern void vdsUpdateTriProxies(vdsTri *t);
-extern void vdsRenderTree(vdsNode *node, vdsRenderFunction render,
+VDS_EXPORT extern void vdsUpdateTriProxies(vdsTri *t);
+VDS_EXPORT extern void vdsRenderTree(vdsNode *node, vdsRenderFunction render,
  vdsVisibilityFunction visible, void *udata);
 
 /* Routines for building the vertex tree (build.c) */
-extern void vdsBeginVertexTree();
-extern void vdsBeginGeometry();
-extern vdsNode *vdsAddNode(vdsFloat x, vdsFloat y, vdsFloat z);
-extern vdsTri *vdsAddTri(int v0, int v1, int v2,
+VDS_EXPORT extern void vdsBeginVertexTree();
+VDS_EXPORT extern void vdsBeginGeometry();
+VDS_EXPORT extern vdsNode *vdsAddNode(vdsFloat x, vdsFloat y, vdsFloat z);
+VDS_EXPORT extern vdsTri *vdsAddTri(int v0, int v1, int v2,
 vdsVec3 n0, vdsVec3 n1, vdsVec3 n2,
 vdsByte3 c0, vdsByte3 c1, vdsByte3 c2);
-extern void vdsNewObject();
-extern vdsNode *vdsEndGeometry();
-extern vdsNode *vdsClusterNodes(int nnodes, vdsNode **nodes,
+VDS_EXPORT extern void vdsNewObject();
+VDS_EXPORT extern vdsNode *vdsEndGeometry();
+VDS_EXPORT extern vdsNode *vdsClusterNodes(int nnodes, vdsNode **nodes,
vdsFloat x, vdsFloat y,