Revision: 76161 http://sourceforge.net/p/brlcad/code/76161 Author: starseeker Date: 2020-06-19 15:11:23 +0000 (Fri, 19 Jun 2020) Log Message: ----------- stub in a view snap subcommand for experimentation
Modified Paths: -------------- brlcad/trunk/src/libged/CMakeLists.txt brlcad/trunk/src/libged/ged_private.h brlcad/trunk/src/libged/view/view.c Added Paths: ----------- brlcad/trunk/src/libged/view/snap.c Modified: brlcad/trunk/src/libged/CMakeLists.txt =================================================================== --- brlcad/trunk/src/libged/CMakeLists.txt 2020-06-19 14:21:53 UTC (rev 76160) +++ brlcad/trunk/src/libged/CMakeLists.txt 2020-06-19 15:11:23 UTC (rev 76161) @@ -341,13 +341,14 @@ v2m_point.c vdraw.c version.c - view/view.c view/aet.c view/center.cpp view/eye.c view/quat.c view/size.c + view/snap.c view/ypr.c + view/view.c view2grid_lu.c view2model.c view2model_lu.c Modified: brlcad/trunk/src/libged/ged_private.h =================================================================== --- brlcad/trunk/src/libged/ged_private.h 2020-06-19 14:21:53 UTC (rev 76160) +++ brlcad/trunk/src/libged/ged_private.h 2020-06-19 15:11:23 UTC (rev 76161) @@ -664,6 +664,10 @@ void _ged_facetize_log_default(struct _ged_facetize_opts *o); + + +extern int ged_view_snap(struct ged *gedp, int argc, const char *argv[]); + __END_DECLS #endif /* LIBGED_GED_PRIVATE_H */ Added: brlcad/trunk/src/libged/view/snap.c =================================================================== --- brlcad/trunk/src/libged/view/snap.c (rev 0) +++ brlcad/trunk/src/libged/view/snap.c 2020-06-19 15:11:23 UTC (rev 76161) @@ -0,0 +1,60 @@ +/* S N A P . C + * BRL-CAD + * + * Copyright (c) 2008-2020 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file libged/eye.c + * + * The eye command. + * + */ + +#include "common.h" + +#include <stdlib.h> +#include <ctype.h> +#include <string.h> + +#include "../ged_private.h" + +int +ged_view_snap(struct ged *gedp, int argc, const char *argv[]) +{ + static const char *usage = "[options] x y [z]"; + + GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR); + GED_CHECK_VIEW(gedp, GED_ERROR); + GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR); + + /* initialize result */ + bu_vls_trunc(gedp->ged_result_str, 0); + + bu_vls_printf(gedp->ged_result_str, "view %s %s", argv[0], usage); + + return GED_OK; +} + + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: "stroustrup" + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: brlcad/trunk/src/libged/view/snap.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Modified: brlcad/trunk/src/libged/view/view.c =================================================================== --- brlcad/trunk/src/libged/view/view.c 2020-06-19 14:21:53 UTC (rev 76160) +++ brlcad/trunk/src/libged/view/view.c 2020-06-19 15:11:23 UTC (rev 76161) @@ -79,6 +79,10 @@ return ged_size(gedp, argc-1, argv+1); } + if (BU_STR_EQUAL(argv[1], "snap")) { + return ged_view_snap(gedp, argc-1, argv+1); + } + bu_vls_printf(gedp->ged_result_str, "Usage: %s %s", argv[0], usage); return GED_ERROR; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits