Revision: 75512
          http://sourceforge.net/p/brlcad/code/75512
Author:   starseeker
Date:     2020-04-22 00:11:28 +0000 (Wed, 22 Apr 2020)
Log Message:
-----------
Merge changes from trunk through r75511

Modified Paths:
--------------
    brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c
    brlcad/branches/dm-fb-merge/src/mged/dozoom.c
    brlcad/branches/dm-fb-merge/src/tclscripts/checker/check.tcl
    brlcad/branches/dm-fb-merge/src/tclscripts/checker/menu.tcl

Property Changed:
----------------
    brlcad/branches/dm-fb-merge/

Index: brlcad/branches/dm-fb-merge
===================================================================
--- brlcad/branches/dm-fb-merge 2020-04-22 00:08:41 UTC (rev 75511)
+++ brlcad/branches/dm-fb-merge 2020-04-22 00:11:28 UTC (rev 75512)

Property changes on: brlcad/branches/dm-fb-merge
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,4 ##
 /brlcad/branches/osg:62110-62113
 /brlcad/branches/prep-cache:68236-68933
 /brlcad/branches/tcltk86:68300-75257
-/brlcad/trunk:75440-75467
\ No newline at end of property
+/brlcad/trunk:75440-75511
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c  2020-04-22 00:08:41 UTC 
(rev 75511)
+++ brlcad/branches/dm-fb-merge/src/libdm/dm-generic.c  2020-04-22 00:11:28 UTC 
(rev 75512)
@@ -799,6 +799,8 @@
     struct solid *sp;
     fastf_t ratio;
     int ndrawn = 0;
+    int opaque = 0;
+    int opaque_only = EQUAL(transparency_threshold, 1.0);
 
     gdlp = BU_LIST_NEXT(display_list, dl);
     while (BU_LIST_NOT_HEAD(gdlp, dl)) {
@@ -811,8 +813,17 @@
            if ((sp->s_iflag == UP && !draw_edit) || (sp->s_iflag != UP && 
draw_edit))
                continue;
 
-           if (!((sp->s_transparency > transparency_threshold) || 
(EQUAL(sp->s_transparency, transparency_threshold))))
-               continue;
+           opaque = EQUAL(sp->s_transparency, 1.0);
+           if (opaque_only) {
+               if (!opaque) {
+                   continue;
+               }
+           } else {
+               /* transparent only */
+               if (opaque || !(sp->s_transparency > transparency_threshold || 
EQUAL(sp->s_transparency, transparency_threshold))) {
+                   continue;
+               }
+           }
 
            if (dm_get_bound_flag(dmp)) {
                ratio = sp->s_size * inv_viewsize;

Modified: brlcad/branches/dm-fb-merge/src/mged/dozoom.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/mged/dozoom.c       2020-04-22 00:08:41 UTC 
(rev 75511)
+++ brlcad/branches/dm-fb-merge/src/mged/dozoom.c       2020-04-22 00:11:28 UTC 
(rev 75512)
@@ -31,10 +31,6 @@
 #include "./sedit.h"
 #include "./mged_dm.h"
 
-#if defined(HAVE_NEXTAFTER) && !defined(HAVE_DECL_NEXTAFTER)
-extern double nextafter(double x, double y);
-#endif
-
 mat_t perspective_mat;
 mat_t incr_change;
 mat_t modelchanges;
@@ -162,7 +158,7 @@
 
        /* Second, draw transparent stuff */
 
-       ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 
nextafter(1.0, 0.0), inv_viewsize,
+       ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 0.0, 
inv_viewsize,
                                      r, g, b, mged_variables->mv_linewidth, 
mged_variables->mv_dlist, 0,
                                      geometry_default_color, 0, 
mged_variables->mv_dlist);
 
@@ -171,7 +167,7 @@
 
     } else {
 
-       ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 0.0, 
inv_viewsize,
+       ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 1.0, 
inv_viewsize,
                                      r, g, b, mged_variables->mv_linewidth, 
mged_variables->mv_dlist, 0,
                                      geometry_default_color, 1, 
mged_variables->mv_dlist);
 
@@ -213,7 +209,7 @@
              color_scheme->cs_geo_hl[2], 1, 1.0);
 
 
-    ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, -1.0, 
inv_viewsize,
+    ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 1.0, 
inv_viewsize,
                                  r, g, b, mged_variables->mv_linewidth, 
mged_variables->mv_dlist, 1,
                                  geometry_default_color, 0, 
mged_variables->mv_dlist);
 

Modified: brlcad/branches/dm-fb-merge/src/tclscripts/checker/check.tcl
===================================================================
--- brlcad/branches/dm-fb-merge/src/tclscripts/checker/check.tcl        
2020-04-22 00:08:41 UTC (rev 75511)
+++ brlcad/branches/dm-fb-merge/src/tclscripts/checker/check.tcl        
2020-04-22 00:11:28 UTC (rev 75512)
@@ -46,6 +46,7 @@
 
        method loadOverlaps { args } {}
        method sortBy { col direction } {}
+       method togglePathDisplay {} {}
 
        method goPrev {} {}
        method goNext {} {}
@@ -70,6 +71,9 @@
        variable _ol_dir ""
        variable _ol_prefix ""
 
+       variable _fullPath
+       variable _fullPathHidden
+
        variable _ck
        variable _status
        variable _commandText
@@ -122,6 +126,7 @@
        method changeMarkOnSelection {tag_cmd}
        method markSelection {}
        method unmarkSelection {}
+       method copySelection {}
 
        method handleProgressButton {}
        method handleCheckListSelect {}
@@ -176,6 +181,7 @@
     set _abort false
     set _doingSubtraction false
     set _drew {}
+    array set _fullPath {}
 
     set _subLeftCommand "puts subtract the left"
     set _subRightCommand "puts subtract the right"
@@ -223,6 +229,13 @@
     itk_component add headerLabelStatus {
        ttk::label $itk_component(headerFrame).headerLabelStatus -text "Data 
Not Yet Loaded" -padding 2
     } {}
+    itk_component add fullPathButton {
+       ttk::checkbutton $itk_component(headerFrame).fullPathDisplayCheckButton 
\
+       -text "Hide Full Path" \
+       -variable [scope _fullPathHidden] \
+       -command [code $this togglePathDisplay]
+    } {}
+    set _fullPathHidden 1
 
     itk_component add checkFrame {
        ttk::frame $itk_interior.checkFrame -padding 2 
@@ -301,10 +314,10 @@
     set _ck $itk_component(checkList)
     set _status $itk_component(headerLabelStatus)
 
-    $_ck column ID -anchor center -width 100 -minwidth 50
-    $_ck column Left -anchor w -width 200 -minwidth 100
-    $_ck column Right -anchor w -width 200 -minwidth 100
-    $_ck column Size -anchor e -width 100 -minwidth 50
+    $_ck column ID -anchor center -stretch false
+    $_ck column Left -anchor w
+    $_ck column Right -anchor w
+    $_ck column Size -anchor e -stretch false
     $_ck heading ID -image _arrowDown -anchor w -command [list $this sortBy ID 
1]
     $_ck heading Left -text "Left" -image _arrowOff -anchor center -command 
[list $this sortBy Left 0]
     $_ck heading Right -text "Right" -image _arrowOff -anchor center -command 
[list $this sortBy Right 0]
@@ -314,9 +327,12 @@
     $itk_component(checkMenu) configure -font $font
     $itk_component(checkMenu) add command -label "Mark Selected" -command 
[code $this markSelection]
     $itk_component(checkMenu) add command -label "Unmark Selected" -command 
[code $this unmarkSelection]
+    $itk_component(checkMenu) add command -label "Copy Fullpaths" -command 
[code $this copySelection]
 
     pack $itk_component(headerFrame) -side top -fill both
-    pack $itk_component(headerLabelStatus) -side left -anchor w
+    grid $itk_component(headerLabelStatus) $itk_component(fullPathButton) 
-sticky nw
+    grid configure $itk_component(fullPathButton) -sticky ne
+    grid columnconfigure $itk_component(headerFrame) 0 -weight 1
 
     pack $itk_component(checkFrame) -expand true -fill both -anchor center
     pack $itk_component(checkFrame).checkScroll -side right -fill y 
@@ -415,6 +431,7 @@
        if {[regexp "$comment_or_empty" "$line"]} {
            continue
        }
+       incr count
        set left [lindex $line 0]
        set right [lindex $line 1]
        set size [lindex $line 2]
@@ -440,6 +457,10 @@
            set right $tmp
        }
 
+       set _fullPath($count) [list $left $right]
+       set left [file tail $left]
+       set right [file tail $right]
+
        set len_left [font measure $font $left]
        set len_right [font measure $font $right]
        set len_size [font measure $font $size]
@@ -454,7 +475,6 @@
            set width_size $len_size
        }
 
-       incr count
        if {$count % 2 == 0} {
            set tag "even"
        } else {
@@ -493,8 +513,12 @@
        set items [$_ck children {}]
        while {[gets $mfile line] >= 0} {
            foreach item $items {
-               if {[$_ck set $item "Left"] == [lindex $line 0] && \
-                   [$_ck set $item "Right"] == [lindex $line 1]} \
+               set fullpaths $_fullPath([$_ck set $item "ID"])
+               set leftPath [lindex $fullpaths 0]
+               set rightPath [lindex $fullpaths 1]
+
+               if {$leftPath == [lindex $line 0] && \
+                   $rightPath == [lindex $line 1]} \
                {
                    $_ck tag add "marked" $item
                    incr _markedCount
@@ -589,7 +613,29 @@
     set _lastSort "$column $direction"
 }
 
+body GeometryChecker::togglePathDisplay {} {
+    if {$_fullPathHidden} {
+       foreach id [$_ck children {}] {
+           set fullpaths $_fullPath([$_ck set $id "ID"])
+           set leftPath [lindex $fullpaths 0]
+           set rightPath [lindex $fullpaths 1]
 
+           $_ck set $id "Left" [file tail $leftPath]
+           $_ck set $id "Right" [file tail $rightPath]
+       }
+    } else {
+       foreach id [$_ck children {}] {
+           set fullpaths $_fullPath([$_ck set $id "ID"])
+           set leftPath [lindex $fullpaths 0]
+           set rightPath [lindex $fullpaths 1]
+
+           $_ck set $id "Left" $leftPath
+           $_ck set $id "Right" $rightPath
+       }
+    }
+}
+
+
 # goPrev
 #
 # select the previous node
@@ -661,7 +707,9 @@
     fconfigure $tmp_chan -encoding utf-8
 
     foreach item $marked_items {
-       puts $tmp_chan "[$_ck set $item "Left"] [$_ck set $item "Right"]"
+       set fullpaths $_fullPath([$_ck set $item "ID"])
+
+       puts $tmp_chan [join $fullpaths " "]
     }
     close $tmp_chan
 
@@ -670,9 +718,9 @@
     fconfigure $tmp_chan -encoding utf-8
 
     foreach item $marked_items {
-       if {[gets $tmp_chan line] < 0 ||\
-           $line != "[$_ck set $item "Left"] [$_ck set $item "Right"]"} \
-       {
+       set fullpaths $_fullPath([$_ck set $item "ID"])
+
+       if {[gets $tmp_chan line] < 0 || $line != [join $fullpaths " "]} {
            puts "ERROR: write to mark file failed"
            return
        }
@@ -762,6 +810,18 @@
     $this changeMarkOnSelection "remove"
 }
 
+body GeometryChecker::copySelection {} {
+    set paths {}
+    set sset [$_ck selection]
+    foreach item $sset {
+       set fullpaths $_fullPath([$_ck set $item "ID"])
+
+       lappend paths {*}$fullpaths
+    }
+    clipboard clear
+    clipboard append $paths
+}
+
 body GeometryChecker::subtractItemRightFromLeft {left right} {
     set _commandText "Subtracting ($right) from ($left)"
     $_overlapCallback $left $right $subtractFirst
@@ -798,8 +858,11 @@
 
     foreach item $sset {
        foreach {id_lbl id left_lbl left right_lbl right size_lbl size} [$_ck 
set $item] {
+           set fullpaths $_fullPath($id)
+           set leftPath [lindex $fullpaths 0]
+           set rightPath [lindex $fullpaths 1]
 
-           if {![catch {$this $subCmd $left $right} err]} {
+           if {![catch {$this $subCmd $leftPath $rightPath} err]} {
                $this markOverlap $id
            } else {
                puts "$err"
@@ -861,11 +924,15 @@
     set drawing ""
     foreach item $sset {
        foreach {id_lbl id left_lbl left right_lbl right size_lbl size} [$_ck 
set $item] {
+           set fullpaths $_fullPath($id)
+           set leftPath [lindex $fullpaths 0]
+           set rightPath [lindex $fullpaths 1]
+
            if {$_drawFirstUnion} {
-               lappend drawing [$this firstUnionedSolid $left]
-               lappend drawing [$this firstUnionedSolid $right]
+               lappend drawing [$this firstUnionedSolid $leftPath]
+               lappend drawing [$this firstUnionedSolid $rightPath]
            } else {
-               lappend drawing $left $right
+               lappend drawing $leftPath $rightPath
            }
        }
     }
@@ -878,11 +945,15 @@
     set _progressButtonInvoked false
     foreach item $sset {
        foreach {id_lbl id left_lbl left right_lbl right size_lbl size} [$_ck 
set $item] {
+           set fullpaths $_fullPath($id)
+           set leftPath [lindex $fullpaths 0]
+           set rightPath [lindex $fullpaths 1]
+
            if {$_drawFirstUnion} {
-               set left [$this firstUnionedSolid $left]
-               set right [$this firstUnionedSolid $right]
+               set leftPath [$this firstUnionedSolid $leftPath]
+               set rightPath [$this firstUnionedSolid $rightPath]
            }
-           set _commandText "Drawing $left"
+           set _commandText "Drawing $leftPath"
 
            if {[$this updateDisplayFinished]} {
                break
@@ -894,7 +965,7 @@
                set _abort false
                lappend _afterCommands [after 3000 \
                    "if {! \[set \"[scope _progressButtonInvoked]\"\]} { \
-                       [code $_leftDrawCallback $left]; \
+                       [code $_leftDrawCallback $leftPath]; \
                        [code set [scope _commandText] ""] \
                    }"]
 
@@ -911,7 +982,7 @@
                    break
                }
            } elseif {! $_progressButtonInvoked} {
-               $_leftDrawCallback $left
+               $_leftDrawCallback $leftPath
            }
 
            if {! $_progressButtonInvoked} {
@@ -918,13 +989,13 @@
                incr count
                set _progressValue [expr $count / [expr $total + 1.0] * 100]
 
-               set _commandText "Drawing $right"
+               set _commandText "Drawing $rightPath"
 
                if {[$this updateDisplayFinished]} {
                    break
                }
 
-               $_rightDrawCallback $right
+               $_rightDrawCallback $rightPath
 
                incr count
                set _progressValue [expr $count / [expr $total + 1.0] * 100]

Modified: brlcad/branches/dm-fb-merge/src/tclscripts/checker/menu.tcl
===================================================================
--- brlcad/branches/dm-fb-merge/src/tclscripts/checker/menu.tcl 2020-04-22 
00:08:41 UTC (rev 75511)
+++ brlcad/branches/dm-fb-merge/src/tclscripts/checker/menu.tcl 2020-04-22 
00:11:28 UTC (rev 75512)
@@ -65,15 +65,15 @@
        ttk::button $itk_component(newFileFrame).buttonRunOvFileGen \
        -text "Create New Overlaps File" -padding 8 -command [ code $this 
runOvFileTool ]
     } {}
-    itk_component add exisitingFileFrame {
-       ttk::labelframe $itk_component(buttonsFrame).exisitingFileFrame 
-padding 8 -text " Exisiting File "
+    itk_component add existingFileFrame {
+       ttk::labelframe $itk_component(buttonsFrame).existingFileFrame -padding 
8 -text " Exisiting File "
     } {}
     itk_component add buttonBrowse {
-       ttk::button $itk_component(exisitingFileFrame).buttonBrowse \
+       ttk::button $itk_component(existingFileFrame).buttonBrowse \
        -text "Browse Overlaps File" -padding 8 -command [ code $this 
browseOverlapFile ]
     } {}
     itk_component add buttonLastFile {
-       ttk::button $itk_component(exisitingFileFrame).buttonLastFile \
+       ttk::button $itk_component(existingFileFrame).buttonLastFile \
        -text "Use Last File" -padding 8 -state disabled -command [ code $this 
runCheckerTool ]
     } {}
     itk_component add hintLabel {
@@ -84,21 +84,22 @@
 
     eval itk_initialize $args
 
-    pack $itk_component(buttonsFrame)
+    grid $itk_component(buttonsFrame) -sticky ew
+    grid $itk_component(hintLabel)
+    grid columnconfigure $itk_interior 0 -weight 1
 
-    pack $itk_component(newFileFrame) -side left -padx { 8 4 }
-    pack $itk_component(buttonRunOvFileGen)
+    grid $itk_component(newFileFrame) $itk_component(existingFileFrame) -padx 4
+
+    grid $itk_component(buttonRunOvFileGen)
+
+    grid $itk_component(buttonLastFile) $itk_component(buttonBrowse) -padx 2
+
     bind $itk_component(buttonRunOvFileGen) <Enter> [code $this handleHintText 
"Creates a new overlaps file with specified objects and runs checker tool on 
the created overlaps file"]
     bind $itk_component(buttonRunOvFileGen) <Leave> [code $this handleHintText 
""]
 
-    pack $itk_component(exisitingFileFrame) -side right -padx { 4 8 }
-    pack $itk_component(buttonLastFile) -side left -padx { 0 8 }
-
-    pack $itk_component(buttonBrowse) -side right
     bind $itk_component(buttonBrowse) <Enter> [code $this handleHintText 
"Select an overlaps file and run checker tool\n"]
     bind $itk_component(buttonBrowse) <Leave> [code $this handleHintText ""]
 
-    pack $itk_component(hintLabel) -pady { 0 4 }
     #load default hint text
     $this handleHintText ""
 
@@ -159,7 +160,6 @@
     pack $checker -expand true -fill both
 
     # calculate default geometry
-    wm withdraw $checkerWindow
     update
 
     # ensure window isn't too narrow

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



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to