Revision: 77324
http://sourceforge.net/p/brlcad/code/77324
Author: starseeker
Date: 2020-10-02 17:20:13 +0000 (Fri, 02 Oct 2020)
Log Message:
-----------
Per user request, add a 'volume' option to types that will match objects
locally defining a non-implicit volume.
Modified Paths:
--------------
brlcad/trunk/NEWS
brlcad/trunk/doc/docbook/system/mann/search.xml
brlcad/trunk/src/librt/search.c
Modified: brlcad/trunk/NEWS
===================================================================
--- brlcad/trunk/NEWS 2020-10-02 15:37:12 UTC (rev 77323)
+++ brlcad/trunk/NEWS 2020-10-02 17:20:13 UTC (rev 77324)
@@ -13,6 +13,7 @@
--- 2020-xx-xx Release 7.32.2 ---
----------------------------------------------------------------------
+* added volume type to search -type filters - Cliff Yapp
* applied shorter default title in fast4-g conversions - Cliff Yapp
* improved pixcmp support for subset image comparisons - Sean Morrison
* added subtract subcommand to MGED analyze command - Cliff Yapp
Modified: brlcad/trunk/doc/docbook/system/mann/search.xml
===================================================================
--- brlcad/trunk/doc/docbook/system/mann/search.xml 2020-10-02 15:37:12 UTC
(rev 77323)
+++ brlcad/trunk/doc/docbook/system/mann/search.xml 2020-10-02 17:20:13 UTC
(rev 77324)
@@ -584,6 +584,15 @@
object whose internal definition indiciates it is of that type.
Currently
such objects are possible with "bot" and "brep" objects.
</para>
+ <para>
+ The the pattern <emphasis remap="B">volume</emphasis> can be used
as a mirror
+ of plate, in that it will report objects that clearly define a
non-implicit
+ solid volume. Its determination is local - for example, combs
aren't matched
+ because a comb may be made up of non-volumetric objects. In
particular,
+ plate mode objects will not match because their volume is implicit,
and
+ (for example) surface mode BoTs will not match because they don't
define a
+ volume.
+ </para
</listitem>
</varlistentry>
</variablelist>
Modified: brlcad/trunk/src/librt/search.c
===================================================================
--- brlcad/trunk/src/librt/search.c 2020-10-02 15:37:12 UTC (rev 77323)
+++ brlcad/trunk/src/librt/search.c 2020-10-02 17:20:13 UTC (rev 77324)
@@ -1132,6 +1132,36 @@
}
}
+ if (!bu_path_match(plan->p_un._type_data, "volume", 0) &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_ANNOT &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_COMBINATION &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_CONSTRAINT &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_DATUM &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_GRIP &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_JOINT &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_PNTS &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_SCRIPT &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_SUBMODEL &&
+ intern.idb_minor_type != DB5_MINORTYPE_BRLCAD_SKETCH) {
+ switch (intern.idb_minor_type) {
+ case DB5_MINORTYPE_BRLCAD_BOT:
+ bot_ip = (struct rt_bot_internal *)intern.idb_ptr;
+ if (bot_ip->mode == RT_BOT_SOLID) {
+ type_match = 1;
+ }
+ break;
+ case DB5_MINORTYPE_BRLCAD_BREP:
+ if (!rt_brep_plate_mode(&intern)) {
+ type_match = 1;
+ }
+ break;
+ default:
+ type_match = 1;
+ break;
+ }
+ }
+
+
rt_db_free_internal(&intern);
return_label:
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