Revision: 75693
          http://sourceforge.net/p/brlcad/code/75693
Author:   starseeker
Date:     2020-05-05 16:11:18 +0000 (Tue, 05 May 2020)
Log Message:
-----------
Not sure how useful this is really, but it does produce individual BoTs for 
each plate mode BoT face and a region unioning them all together.  Doesn't 
respect the various plate mode settings, and the averaging of the normals at 
vertices has some definite drawbacks, but in at least some cases it will avoid 
visual cracks.  Too much thickness with the plate mode compared to a face's 
area and the 'inner' extruded face will twist/invert - need to come up with a 
check for that.

Modified Paths:
--------------
    brlcad/trunk/src/libged/CMakeLists.txt
    brlcad/trunk/src/libged/bot/arb6.cpp
    brlcad/trunk/src/libged/bot/bot.cpp
    brlcad/trunk/src/libged/bot/ged_bot.h

Property Changed:
----------------
    brlcad/trunk/
    brlcad/trunk/src/other/
    brlcad/trunk/src/other/stepcode/

Index: brlcad/trunk
===================================================================
--- brlcad/trunk        2020-05-05 15:54:57 UTC (rev 75692)
+++ brlcad/trunk        2020-05-05 16:11:18 UTC (rev 75693)

Property changes on: brlcad/trunk
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
-/brlcad/branches/RELEASE:57439,57447-57860,69901-69913,70323-70333,71915-72242,72525-72534,72826-72858,74376-74454,74964-75140
+/brlcad/branches/RELEASE:57439,57447-57860,69901-69913,70323-70333,71915-72242,72525-72534,72826-72858,74376-74454,74964-75140,75682-75685
 
/brlcad/branches/brep-debug:61373,61375,61404,61427,61429,61470,61544,61567,61576,61999,62018,62094,62098,62107,62117,62406,62416-62519,62521-62584,62593-62614,62623,62658,62660-62674,62681-62771,62876,62901,62907,62910,62925,62928,62931-63025,63027,63051,63054-63056,63069,63071-63073,63122,63160-63161,63165,63171,63184,63187,63189-63190,63193-63196,63200,63202,63205-63210,63213,63219-63225,63232-63233,63236,63238,63338,63350-63353,63481,63618,63669,64173-64174,64176-64177,64229-64233,64242,64244,64360-64362,65165,65245,65249,65334,65833-65834,66370-66375,66931-66932,66934,67012-67015,67018-67019,67021-67022,67406,67740,67746-67748,67950,67952,68144-68145,68636,68640-68643,68820,69081,69109,69168,69206,69289,69346,69460-69461,69582-69583,69719-69721,69857-69859,69927,69995-69996,70148-70149,70347-70349,70377,70526-70527,71006-71007,71009-71022,71046-71047,71049,71096-71100
 /brlcad/branches/bullet:62518
 /brlcad/branches/cmake:43219
Modified: brlcad/trunk/src/libged/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/libged/CMakeLists.txt      2020-05-05 15:54:57 UTC (rev 
75692)
+++ brlcad/trunk/src/libged/CMakeLists.txt      2020-05-05 16:11:18 UTC (rev 
75693)
@@ -62,6 +62,7 @@
   bigE.c
   blast.c
   bo.c
+  bot/arb6.cpp
   bot/bot.cpp
   bot/check.cpp
   bot/remesh.cpp
@@ -419,7 +420,6 @@
   CMakeLists.txt
   TODO
   pnts_util.h
-  bot/arb6.cpp
   bot/ged_bot.h
   brep/ged_brep.h
   ged_private.h

Modified: brlcad/trunk/src/libged/bot/arb6.cpp
===================================================================
--- brlcad/trunk/src/libged/bot/arb6.cpp        2020-05-05 15:54:57 UTC (rev 
75692)
+++ brlcad/trunk/src/libged/bot/arb6.cpp        2020-05-05 16:11:18 UTC (rev 
75693)
@@ -1,4 +1,4 @@
-/*                        A R B 6 . C P P
+/*                      E X T R U D E . C P P
  * BRL-CAD
  *
  * Copyright (c) 2020 United States Government as represented by
@@ -17,10 +17,18 @@
  * License along with this file; see the file named COPYING for more
  * information.
  */
-/** @file arb6.cpp
+/** @file extrude.cpp
  *
- * Brief description
+ * Given a plate mode bot, approximate it with an extrusion of the
+ * individual triangles using the average of the normals of each
+ * vertex for a direction.
  *
+ * This method tries to produce a region comb unioning individual BoT
+ * objects for each face, to avoid visual gaps between individual
+ * faces.  This comes at a cost in thickness accuracy, and can produce
+ * other artifacts.  It will also produce very long, thin triangles
+ * along the "sides" of plate regions.
+ *
  */
 
 #include "common.h"
@@ -134,7 +142,7 @@
     // Make a comb to hold the union of the new solid primitives
     struct wmember wcomb;
     struct bu_vls comb_name = BU_VLS_INIT_ZERO;
-    bu_vls_sprintf(&comb_name, "%s_solid.c", gb->dp->d_namep);
+    bu_vls_sprintf(&comb_name, "%s_solid.r", gb->dp->d_namep);
     // TODO - db_lookup to make sure it doesn't already exist
     BU_LIST_INIT(&wcomb.l);
 
@@ -157,8 +165,8 @@
                VSCALE(fnorm, fnorm, -1);
            }
            VMOVE(pf[j], &bot->vertices[bot->faces[i*3+j]*3]);
-           VSCALE(pv1[j], fnorm, bot->thickness[i]);
-           VSCALE(pv2[j], fnorm, -1*bot->thickness[i]);
+           VSCALE(pv1[j], fnorm, bot->thickness[i] * ((bot->mode == RT_BOT_CW) 
? -1 : 0));
+           VSCALE(pv2[j], fnorm, -1*bot->thickness[i] * ((bot->mode == 
RT_BOT_CW) ? -1 : 0));
        }
        for (int j = 0; j < 3; j++) {
            point_t npnt1;
@@ -231,7 +239,7 @@
     }
 
     // Write the comb
-    mk_lcomb(gb->gedp->ged_wdbp, bu_vls_addr(&comb_name), &wcomb, 0, NULL, 
NULL, NULL, 0);
+    mk_lcomb(gb->gedp->ged_wdbp, bu_vls_addr(&comb_name), &wcomb, 1, NULL, 
NULL, NULL, 0);
 
     bu_vls_free(&comb_name);
     bu_vls_free(&prim_name);

Modified: brlcad/trunk/src/libged/bot/bot.cpp
===================================================================
--- brlcad/trunk/src/libged/bot/bot.cpp 2020-05-05 15:54:57 UTC (rev 75692)
+++ brlcad/trunk/src/libged/bot/bot.cpp 2020-05-05 16:11:18 UTC (rev 75693)
@@ -261,7 +261,7 @@
 }
 
 const struct bu_cmdtab _bot_cmds[] = {
-    //{ "arb6",       _bot_cmd_arb6},
+    { "extrude",    _bot_cmd_extrude},
     { "get",        _bot_cmd_get},
     { "check",      _bot_cmd_check},
     { "chull",      _bot_cmd_chull},

Modified: brlcad/trunk/src/libged/bot/ged_bot.h
===================================================================
--- brlcad/trunk/src/libged/bot/ged_bot.h       2020-05-05 15:54:57 UTC (rev 
75692)
+++ brlcad/trunk/src/libged/bot/ged_bot.h       2020-05-05 16:11:18 UTC (rev 
75693)
@@ -66,6 +66,8 @@
 
 int _bot_cmd_msgs(void *bs, int argc, const char **argv, const char *us, const 
char *ps);
 
+int _bot_cmd_extrude(void *bs, int argc, const char **argv);
+
 int _bot_cmd_check(void *bs, int argc, const char **argv);
 
 int _bot_cmd_remesh(void *bs, int argc, const char **argv);

Index: brlcad/trunk/src/other
===================================================================
--- brlcad/trunk/src/other      2020-05-05 15:54:57 UTC (rev 75692)
+++ brlcad/trunk/src/other      2020-05-05 16:11:18 UTC (rev 75693)

Property changes on: brlcad/trunk/src/other
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
-/brlcad/branches/RELEASE/src/other:57439,57447-57860,69901-69913,71917-72242,72525-72534,72826-72858,74376-74454
+/brlcad/branches/RELEASE/src/other:57439,57447-57860,69901-69913,71917-72242,72525-72534,72826-72858,74376-74454,75682-75685
 
/brlcad/branches/brep-debug/src/other:61373,61375,61404,61427,61429,61470,61544,61567,61576,61999,62018,62094,62098,62107,62117,62406,62416-62519,62521-62584,62593-62614,62623,62658,62660-62674,62681-62771,62876,62901,62907,62910,62925,62928,62931-63025,63027,63051,63054-63056,63069,63071-63073,63122,63160-63161,63165,63171,63184,63187,63189-63190,63193-63196,63200,63202,63205-63210,63213,63219-63225,63232-63233,63236,63238,63338,63350-63353,63481,63618,63669,64173-64174,64176-64177,64229-64233,64242,64244,64360-64362,65165,65245,65249,65334,65833-65834,66370-66375,66931-66932,66934,67012-67015,67018-67019,67021-67022,67406,67740,67746-67748,67950,67952,68144-68145,68636,68640-68643,68820,69081,69109,69206,69289,69346,69460-69461,69582-69583,69719-69721,69857-69859,69927
 /brlcad/branches/bullet/src/other:62518
 /brlcad/branches/cmake/src/other:43219
Index: brlcad/trunk/src/other/stepcode
===================================================================
--- brlcad/trunk/src/other/stepcode     2020-05-05 15:54:57 UTC (rev 75692)
+++ brlcad/trunk/src/other/stepcode     2020-05-05 16:11:18 UTC (rev 75693)

Property changes on: brlcad/trunk/src/other/stepcode
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
-/brlcad/branches/RELEASE/src/other/stepcode:57439,57447-57860,69901-69913,71917-72242,72525-72534,72826-72858,74376-74454
+/brlcad/branches/RELEASE/src/other/stepcode:57439,57447-57860,69901-69913,71917-72242,72525-72534,72826-72858,74376-74454,75682-75685
 
/brlcad/branches/brep-debug/src/other/stepcode:61373,61375,61404,61427,61429,61470,61544,61567,61576,61999,62018,62094,62098,62107,62117,62406,62416-62519,62521-62584,62593-62614,62623,62658,62660-62674,62681-62771,62876,62901,62907,62910,62925,62928,62931-63025,63027,63051,63054-63056,63069,63071-63073,63122,63160-63161,63165,63171,63184,63187,63189-63190,63193-63196,63200,63202,63205-63210,63213,63219-63225,63232-63233,63236,63238,63338,63350-63353,63481,63618,63669,64173-64174,64176-64177,64229-64233,64242,64244,64360-64362,65165,65245,65249,65334,65833-65834,66370-66375,66931-66932,66934,67012-67015,67018-67019,67021-67022,67406,67740,67746-67748,67950,67952,68144-68145,68636,68640-68643,68820,69081,69109,69206,69289,69346,69460-69461,69582-69583,69719-69721,69857-69859,69927
 /brlcad/branches/bullet/src/other/stepcode:62518
 /brlcad/branches/cmake/src/other/stepcode:43219
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