Revision: 45938 http://brlcad.svn.sourceforge.net/brlcad/?rev=45938&view=rev Author: brlcad Date: 2011-08-12 04:37:18 +0000 (Fri, 12 Aug 2011)
Log Message: ----------- the keep command now saves the sketch associated with a revolve, not just the revolve itself. Modified Paths: -------------- brlcad/trunk/NEWS brlcad/trunk/src/libged/keep.c Modified: brlcad/trunk/NEWS =================================================================== --- brlcad/trunk/NEWS 2011-08-12 04:29:06 UTC (rev 45937) +++ brlcad/trunk/NEWS 2011-08-12 04:37:18 UTC (rev 45938) @@ -13,6 +13,7 @@ --- 2011-07-XX Release 7.20.4 --- ---------------------------------------------------------------------- +* 'keep' command includes sketch when keeping revolve - Sean Morrison * modified archer startup to not require html documentation files - Cliff Yapp, Brandon Hinesley * improved mged/archer/bwish run-time path behavior on Windows Modified: brlcad/trunk/src/libged/keep.c =================================================================== --- brlcad/trunk/src/libged/keep.c 2011-08-12 04:29:06 UTC (rev 45937) +++ brlcad/trunk/src/libged/keep.c 2011-08-12 04:37:18 UTC (rev 45938) @@ -60,8 +60,8 @@ return; } - /* if this is an extrusion, keep the referenced sketch */ if (dp->d_major_type == DB5_MAJORTYPE_BRLCAD && dp->d_minor_type == DB5_MINORTYPE_BRLCAD_EXTRUDE) { + /* if this is an extrusion, keep the referenced sketch */ struct rt_extrude_internal *extr; struct directory *dp2; @@ -71,11 +71,22 @@ if ((dp2 = db_lookup(dbip, extr->sketch_name, LOOKUP_QUIET)) != RT_DIR_NULL) { node_write(dbip, dp2, ptr); } + } else if (dp->d_major_type == DB5_MAJORTYPE_BRLCAD && dp->d_minor_type == DB5_MINORTYPE_BRLCAD_REVOLVE) { + /* if this is a revolve, keep the referenced sketch */ + struct rt_revolve_internal *rev; + struct directory *dp2; + + rev = (struct rt_revolve_internal *)intern.idb_ptr; + RT_REVOLVE_CK_MAGIC(rev); + + if ((dp2 = db_lookup(dbip, bu_vls_addr(&rev->sketch_name), LOOKUP_QUIET)) != RT_DIR_NULL) { + node_write(dbip, dp2, ptr); + } } else if (dp->d_major_type == DB5_MAJORTYPE_BRLCAD && dp->d_minor_type == DB5_MINORTYPE_BRLCAD_DSP) { + /* if this is a DSP, keep the referenced binary object too */ struct rt_dsp_internal *dsp; struct directory *dp2; - /* this is a DSP, if it uses a binary object, keep it also */ dsp = (struct rt_dsp_internal *)intern.idb_ptr; RT_DSP_CK_MAGIC(dsp); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits