Revision: 76148
          http://sourceforge.net/p/brlcad/code/76148
Author:   starseeker
Date:     2020-06-17 21:55:57 +0000 (Wed, 17 Jun 2020)
Log Message:
-----------
Merge changes from trunk - r76134 through r76146

Modified Paths:
--------------
    brlcad/branches/bioh/INSTALL
    brlcad/branches/bioh/NEWS
    brlcad/branches/bioh/include/dm.h
    brlcad/branches/bioh/misc/CMake/CMakeLists.txt
    brlcad/branches/bioh/misc/tools/debug2c/CMakeLists.txt
    brlcad/branches/bioh/misc/tools/env2c/CMakeLists.txt
    brlcad/branches/bioh/src/libdm/dm_obj.c
    brlcad/branches/bioh/src/libdm/scale.c
    brlcad/branches/bioh/src/libfft/CMakeLists.txt
    brlcad/branches/bioh/src/libtclcad/tclcad_obj.c
    brlcad/branches/bioh/src/tclscripts/lib/Display.tcl
    brlcad/branches/bioh/src/util/CMakeLists.txt

Added Paths:
-----------
    brlcad/branches/bioh/misc/CMake/FindFontconfig.cmake

Property Changed:
----------------
    brlcad/branches/bioh/
    brlcad/branches/bioh/NEWS
    brlcad/branches/bioh/include/

Index: brlcad/branches/bioh
===================================================================
--- brlcad/branches/bioh        2020-06-17 21:54:28 UTC (rev 76147)
+++ brlcad/branches/bioh        2020-06-17 21:55:57 UTC (rev 76148)

Property changes on: brlcad/branches/bioh
___________________________________________________________________
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:75720-76134
\ No newline at end of property
+/brlcad/trunk:75720-76146
\ No newline at end of property
Modified: brlcad/branches/bioh/INSTALL
===================================================================
--- brlcad/branches/bioh/INSTALL        2020-06-17 21:54:28 UTC (rev 76147)
+++ brlcad/branches/bioh/INSTALL        2020-06-17 21:55:57 UTC (rev 76148)
@@ -53,7 +53,7 @@
 
 For the impatient or simplistic, the following steps should compile,
 test, and install an optimized BRL-CAD quickly into the
-/usr/brlcad/rel-VERSION directory if CMake is alrady installed:
+/usr/brlcad/rel-VERSION directory if CMake is already installed:
 
   tar -zxvf brlcad-VERSION.tar
   mkdir brlcad-VERSION/build

Modified: brlcad/branches/bioh/NEWS
===================================================================
--- brlcad/branches/bioh/NEWS   2020-06-17 21:54:28 UTC (rev 76147)
+++ brlcad/branches/bioh/NEWS   2020-06-17 21:55:57 UTC (rev 76148)
@@ -13,6 +13,7 @@
 --- 20XX-XX-XX  Release 7.3X.X                                     ---
 ----------------------------------------------------------------------
 
+* added units label to the Archer in-scene scale graphic - Cliff Yapp
 * improved output path sorting of search command - Cliff Yapp
 * added 3dm-g failure message about supported versions - Cliff Yapp
 * fixed bw-png writing corrupted png files on Windows - Sean Morrison


Property changes on: brlcad/branches/bioh/NEWS
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,4 ##
 /brlcad/branches/osg/NEWS:62110-62113
 /brlcad/branches/prep-cache/NEWS:68236-68933
 /brlcad/branches/tcltk86/NEWS:68300-75257
-/brlcad/trunk/NEWS:75728-75834,75934-76085
\ No newline at end of property
+/brlcad/trunk/NEWS:75728-75834,75934-76085,76134-76146
\ No newline at end of property
Index: brlcad/branches/bioh/include
===================================================================
--- brlcad/branches/bioh/include        2020-06-17 21:54:28 UTC (rev 76147)
+++ brlcad/branches/bioh/include        2020-06-17 21:55:57 UTC (rev 76148)

Property changes on: brlcad/branches/bioh/include
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,4 ##
 /brlcad/branches/osg/include:62110-62113
 /brlcad/branches/prep-cache/include:68236-68933
 /brlcad/branches/tcltk86/include:68300-75257
-/brlcad/trunk/include:75728-75834,75891-75926,75986-76134
\ No newline at end of property
+/brlcad/trunk/include:75728-75834,75891-75926,75986-76146
\ No newline at end of property
Modified: brlcad/branches/bioh/include/dm.h
===================================================================
--- brlcad/branches/bioh/include/dm.h   2020-06-17 21:54:28 UTC (rev 76147)
+++ brlcad/branches/bioh/include/dm.h   2020-06-17 21:55:57 UTC (rev 76148)
@@ -312,6 +312,7 @@
 /* scale.c */
 DM_EXPORT extern void dm_draw_scale(dm *dmp,
                                    fastf_t viewSize,
+                                   const char *unit,
                                    int *lineColor,
                                    int *textColor);
 

Modified: brlcad/branches/bioh/misc/CMake/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/misc/CMake/CMakeLists.txt      2020-06-17 21:54:28 UTC 
(rev 76147)
+++ brlcad/branches/bioh/misc/CMake/CMakeLists.txt      2020-06-17 21:55:57 UTC 
(rev 76148)
@@ -22,6 +22,7 @@
   FindAppleseed.cmake
   FindBlosc.cmake
   FindBSON.cmake
+  FindFontconfig.cmake
   FindGECODE.cmake
   FindGL.cmake
   FindIlmBase.cmake

Copied: brlcad/branches/bioh/misc/CMake/FindFontconfig.cmake (from rev 76146, 
brlcad/trunk/misc/CMake/FindFontconfig.cmake)
===================================================================
--- brlcad/branches/bioh/misc/CMake/FindFontconfig.cmake                        
        (rev 0)
+++ brlcad/branches/bioh/misc/CMake/FindFontconfig.cmake        2020-06-17 
21:55:57 UTC (rev 76148)
@@ -0,0 +1,101 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindFontconfig
+--------------
+
+Find Fontconfig headers and library.
+
+Imported Targets
+^^^^^^^^^^^^^^^^
+
+``Fontconfig::Fontconfig``
+  The Fontconfig library, if found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This will define the following variables in your project:
+
+``Fontconfig_FOUND``
+  true if (the requested version of) Fontconfig is available.
+``Fontconfig_VERSION``
+  the version of Fontconfig.
+``Fontconfig_LIBRARIES``
+  the libraries to link against to use Fontconfig.
+``Fontconfig_INCLUDE_DIRS``
+  where to find the Fontconfig headers.
+``Fontconfig_COMPILE_OPTIONS``
+  this should be passed to target_compile_options(), if the
+  target is not used for linking
+
+#]=======================================================================]
+
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+find_package(PkgConfig QUIET)
+pkg_check_modules(PKG_FONTCONFIG QUIET fontconfig)
+set(Fontconfig_COMPILE_OPTIONS ${PKG_FONTCONFIG_CFLAGS_OTHER})
+set(Fontconfig_VERSION ${PKG_FONTCONFIG_VERSION})
+
+find_path( Fontconfig_INCLUDE_DIR
+  NAMES
+    fontconfig/fontconfig.h
+  HINTS
+    ${PKG_FONTCONFIG_INCLUDE_DIRS}
+    /usr/X11/include
+)
+
+find_library( Fontconfig_LIBRARY
+  NAMES
+    fontconfig
+  PATHS
+    ${PKG_FONTCONFIG_LIBRARY_DIRS}
+)
+
+if (Fontconfig_INCLUDE_DIR AND NOT Fontconfig_VERSION)
+  file(STRINGS ${Fontconfig_INCLUDE_DIR}/fontconfig/fontconfig.h _contents 
REGEX "^#define[ \t]+FC_[A-Z]+[ \t]+[0-9]+$")
+  unset(Fontconfig_VERSION)
+  foreach(VPART MAJOR MINOR REVISION)
+    foreach(VLINE ${_contents})
+      if(VLINE MATCHES "^#define[\t ]+FC_${VPART}[\t ]+([0-9]+)$")
+        set(Fontconfig_VERSION_PART "${CMAKE_MATCH_1}")
+        if(Fontconfig_VERSION)
+          string(APPEND Fontconfig_VERSION ".${Fontconfig_VERSION_PART}")
+        else()
+          set(Fontconfig_VERSION "${Fontconfig_VERSION_PART}")
+        endif()
+      endif()
+    endforeach()
+  endforeach()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Fontconfig
+  FOUND_VAR
+    Fontconfig_FOUND
+  REQUIRED_VARS
+    Fontconfig_LIBRARY
+    Fontconfig_INCLUDE_DIR
+  VERSION_VAR
+    Fontconfig_VERSION
+)
+
+
+if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig)
+  add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED)
+  set_target_properties(Fontconfig::Fontconfig PROPERTIES
+    IMPORTED_LOCATION "${Fontconfig_LIBRARY}"
+    INTERFACE_COMPILE_OPTIONS "${Fontconfig_COMPILE_OPTIONS}"
+    INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIR}"
+  )
+endif()
+
+mark_as_advanced(Fontconfig_LIBRARY Fontconfig_INCLUDE_DIR)
+
+if(Fontconfig_FOUND)
+  set(Fontconfig_LIBRARIES ${Fontconfig_LIBRARY})
+  set(Fontconfig_INCLUDE_DIRS ${Fontconfig_INCLUDE_DIR})
+endif()

Modified: brlcad/branches/bioh/misc/tools/debug2c/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/misc/tools/debug2c/CMakeLists.txt      2020-06-17 
21:54:28 UTC (rev 76147)
+++ brlcad/branches/bioh/misc/tools/debug2c/CMakeLists.txt      2020-06-17 
21:55:57 UTC (rev 76148)
@@ -44,7 +44,14 @@
   ${CMAKE_CURRENT_SOURCE_DIR}
   )
 
+include(CheckCXXCompilerFlag)
+check_cxx_compiler_flag(-O3 O3_COMPILER_FLAG)
+
 add_executable(debug2c debug2c.cxx)
+if (O3_COMPILER_FLAG)
+  # If we have the O3 flag, use it
+  target_compile_options(debug2c PRIVATE "-O3")
+endif (O3_COMPILER_FLAG)
 
 # Local Variables:
 # tab-width: 8

Modified: brlcad/branches/bioh/misc/tools/env2c/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/misc/tools/env2c/CMakeLists.txt        2020-06-17 
21:54:28 UTC (rev 76147)
+++ brlcad/branches/bioh/misc/tools/env2c/CMakeLists.txt        2020-06-17 
21:55:57 UTC (rev 76148)
@@ -46,7 +46,15 @@
 
 find_package(Threads)
 
+include(CheckCXXCompilerFlag)
+check_cxx_compiler_flag(-O3 O3_COMPILER_FLAG)
+
 add_executable(env2c env2c.cxx)
+if (O3_COMPILER_FLAG)
+  # If we have the O3 flag, use it
+  target_compile_options(env2c PRIVATE "-O3")
+endif (O3_COMPILER_FLAG)
+
 target_link_libraries(env2c ${CMAKE_THREAD_LIBS_INIT})
 
 # Local Variables:

Modified: brlcad/branches/bioh/src/libdm/dm_obj.c
===================================================================
--- brlcad/branches/bioh/src/libdm/dm_obj.c     2020-06-17 21:54:28 UTC (rev 
76147)
+++ brlcad/branches/bioh/src/libdm/dm_obj.c     2020-06-17 21:55:57 UTC (rev 
76148)
@@ -1173,7 +1173,7 @@
  * Draw a scale.
  *
  * Usage:
- * drawScale vsize color
+ * drawScale vsize unit color
  *
  */
 int
@@ -1181,12 +1181,13 @@
                  int argc,
                  const char **argv)
 {
+    const char *unit;
     int color[3];
     double scan;
     fastf_t viewSize;
     struct bu_vls vls = BU_VLS_INIT_ZERO;
 
-    if (argc != 3) {
+    if (argc != 4) {
        bu_vls_printf(&vls, "helplib_alias dm_drawScale %s", argv[0]);
        Tcl_Eval(dmop->interp, bu_vls_addr(&vls));
        bu_vls_free(&vls);
@@ -1203,7 +1204,10 @@
     /* convert double to fastf_t */
     viewSize = scan;
 
-    if (sscanf(argv[2], "%d %d %d",
+
+    unit = argv[2];
+
+    if (sscanf(argv[3], "%d %d %d",
               &color[0],
               &color[1],
               &color[2]) != 3) {
@@ -1227,7 +1231,7 @@
        return BRLCAD_ERROR;
     }
 
-    dm_draw_scale(dmop->dmo_dmp, viewSize, color, color);
+    dm_draw_scale(dmop->dmo_dmp, viewSize, unit, color, color);
 
     return BRLCAD_OK;
 }
@@ -1235,7 +1239,7 @@
 
 /*
  * Usage:
- * objname drawScale vsize color
+ * objname drawScale vsize unit color
  */
 HIDDEN int
 dmo_drawScale_tcl(void *clientData, int argc, const char **argv)

Modified: brlcad/branches/bioh/src/libdm/scale.c
===================================================================
--- brlcad/branches/bioh/src/libdm/scale.c      2020-06-17 21:54:28 UTC (rev 
76147)
+++ brlcad/branches/bioh/src/libdm/scale.c      2020-06-17 21:55:57 UTC (rev 
76148)
@@ -38,6 +38,7 @@
 void
 dm_draw_scale(dm *dmp,
              fastf_t   viewSize,
+             const char *unit,
              int       *lineColor,
              int       *textColor)
 {
@@ -53,6 +54,9 @@
     dm_set_line_attr(dmp, dmp->dm_lineWidth, 0);  /* solid lines */
 
     bu_vls_printf(&vls, "%g", viewSize*0.5);
+    if (unit) {
+       bu_vls_printf(&vls, "%s", unit);
+    }
     soffset = (int)(strlen(bu_vls_addr(&vls)) * 0.5);
 
     xpos1 = -0.5;

Modified: brlcad/branches/bioh/src/libfft/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libfft/CMakeLists.txt      2020-06-17 21:54:28 UTC 
(rev 76147)
+++ brlcad/branches/bioh/src/libfft/CMakeLists.txt      2020-06-17 21:55:57 UTC 
(rev 76148)
@@ -10,11 +10,13 @@
 BRLCAD_LIB_INCLUDE_DIRS(fft FFT_INCLUDE_DIRS FFT_LOCAL_INCLUDE_DIRS)
 
 add_executable(fftc fftc.c splitditc.c)
+set_property(TARGET fftc APPEND PROPERTY COMPILE_DEFINITIONS BRLCADBUILD 
HAVE_CONFIG_H)
 SetTargetFolder(fftc "Compilation Utilities")
 target_link_libraries(fftc ${M_LIBRARY})
 CMAKEFILES(fftc.c splitditc.c)
 
 add_executable(ifftc ifftc.c ditsplitc.c)
+set_property(TARGET ifftc APPEND PROPERTY COMPILE_DEFINITIONS BRLCADBUILD 
HAVE_CONFIG_H)
 SetTargetFolder(ifftc "Compilation Utilities")
 target_link_libraries(ifftc ${M_LIBRARY})
 CMAKEFILES(ifftc.c ditsplitc.c)
@@ -57,6 +59,7 @@
 set_target_properties(libfft PROPERTIES VERSION 20.0.1 SOVERSION 20)
 
 add_executable(fftest fftest.c)
+set_property(TARGET fftest APPEND PROPERTY COMPILE_DEFINITIONS BRLCADBUILD 
HAVE_CONFIG_H)
 SetTargetFolder(fftest "Compilation Utilities")
 target_link_libraries(fftest libfft ${M_LIBRARY})
 CMAKEFILES(fftest.c)

Modified: brlcad/branches/bioh/src/libtclcad/tclcad_obj.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/tclcad_obj.c     2020-06-17 21:54:28 UTC 
(rev 76147)
+++ brlcad/branches/bioh/src/libtclcad/tclcad_obj.c     2020-06-17 21:55:57 UTC 
(rev 76148)
@@ -15685,6 +15685,7 @@
     if (gdvp->gdv_view->gv_view_scale.gos_draw)
        dm_draw_scale(gdvp->gdv_dmp,
                      
gdvp->gdv_view->gv_size*gop->go_gedp->ged_wdbp->dbip->dbi_base2local,
+                     
bu_units_string(1/gop->go_gedp->ged_wdbp->dbip->dbi_base2local),
                      gdvp->gdv_view->gv_view_scale.gos_line_color,
                      gdvp->gdv_view->gv_view_params.gos_text_color);
 

Modified: brlcad/branches/bioh/src/tclscripts/lib/Display.tcl
===================================================================
--- brlcad/branches/bioh/src/tclscripts/lib/Display.tcl 2020-06-17 21:54:28 UTC 
(rev 76147)
+++ brlcad/branches/bioh/src/tclscripts/lib/Display.tcl 2020-06-17 21:55:57 UTC 
(rev 76148)
@@ -750,7 +750,7 @@
        }
 
        if {$itk_option(-scaleEnable)} {
-           Dm::drawScale [View::size] $itk_option(-scaleColor)
+           Dm::drawScale [View::size] [View::units] $itk_option(-scaleColor)
        }
 
        if {$itk_option(-primitiveLabels) != {}} {

Modified: brlcad/branches/bioh/src/util/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/util/CMakeLists.txt        2020-06-17 21:54:28 UTC 
(rev 76147)
+++ brlcad/branches/bioh/src/util/CMakeLists.txt        2020-06-17 21:55:57 UTC 
(rev 76148)
@@ -67,7 +67,7 @@
 BRLCAD_ADDEXEC(double-asc double-asc.c "libfb;libbu")
 BRLCAD_ADDEXEC(dpix-pix dpix-pix.c libbu)
 BRLCAD_ADDEXEC(gencolor gencolor.c libbu)
-BRLCAD_ADDEXEC(halftone2 halftone.c "librt;libfb;libbu")
+BRLCAD_ADDEXEC(halftone halftone.c "librt;libfb;libbu")
 
 # This is intended to replace all of the img-img utils eventually
 BRLCAD_ADDEXEC(icv icv.cpp "libicv;libbu")

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