From edeb17ef82ef9f7c27bd827214d0279ee84a5ea8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Thu, 20 Mar 2014 17:02:09 +0100 Subject: [PATCH] remove unsafe hkl_geometry_axes_get method replace it with hkl_factory_axes_get which return a list of axis names. fix also the python.py unit test for the Factory part. --- gui/hkl-gui-callbacks.cpp | 6 ++-- gui/hkl-gui-modelcolumns.h | 10 +++---- gui/hkl-gui.cpp | 50 ++++++++++++++++++-------------- gui/hkl-gui.h | 1 + hkl.h | 5 ++-- hkl/hkl-factory.c | 48 ++++++++++++++++++++++++++++++ hkl/hkl-geometry.c | 5 ---- tests/Makefile.am | 2 -- tests/bindings/python.py | 25 +++++++++++----- tests/hkl-pseudoaxis-e6c-t.c | 18 +++++++----- tests/hkl-pseudoaxis-soleil-sixs-med-t.c | 8 ++--- tests/hkl3d-test-t.c | 4 +-- 12 files changed, 121 insertions(+), 61 deletions(-) diff --git a/gui/hkl-gui-callbacks.cpp b/gui/hkl-gui-callbacks.cpp index e42555e7..cbf018fc 100644 --- a/gui/hkl-gui-callbacks.cpp +++ b/gui/hkl-gui-callbacks.cpp @@ -912,13 +912,15 @@ void HKLWindow::on_combobox1_changed(void) HklFactory **factories; factories = hkl_factory_get_all(&n); + this->_factory = factories[idx]; + if(_geometry) hkl_geometry_free(_geometry); - _geometry = hkl_factory_create_new_geometry(factories[idx]); + _geometry = hkl_factory_create_new_geometry(this->_factory); if(_engines) hkl_engine_list_free(_engines); - _engines = hkl_factory_create_new_engine_list(factories[idx]); + _engines = hkl_factory_create_new_engine_list(this->_factory); hkl_engine_list_init(_engines, _geometry, _detector, _sample); this->set_up_pseudo_axes_frames(); diff --git a/gui/hkl-gui-modelcolumns.h b/gui/hkl-gui-modelcolumns.h index 11b97ff9..fe063b55 100644 --- a/gui/hkl-gui-modelcolumns.h +++ b/gui/hkl-gui-modelcolumns.h @@ -135,16 +135,16 @@ public: Gtk::TreeModelColumn item; std::vector > axes; - SolutionModelColumns(HklGeometry *geometry) + SolutionModelColumns(HklFactory *factory) { - const darray_parameter *axes; - HklParameter **axis; + const char **axes; + size_t i, axes_length; this->add(this->index); this->add(this->item); - axes = hkl_geometry_axes_get(geometry); - darray_foreach(axis, *axes){ + axes = hkl_factory_axes_get(factory, &axes_length); + for(i=0; iaxes.push_back(Gtk::TreeModelColumn()); this->add(this->axes.back()); } diff --git a/gui/hkl-gui.cpp b/gui/hkl-gui.cpp index 8dd7f2dc..95d25839 100644 --- a/gui/hkl-gui.cpp +++ b/gui/hkl-gui.cpp @@ -28,6 +28,7 @@ HKLWindow::HKLWindow(void) size_t i; + _factory = NULL; _geometry = NULL; _engines = NULL; @@ -356,6 +357,9 @@ void HKLWindow::set_up_TreeView_axes(void) size_t i; int index; + const char **axes; + size_t axes_length; + Gtk::CellRenderer * renderer; //Create the Model @@ -391,14 +395,14 @@ void HKLWindow::set_up_TreeView_axes(void) sigc::mem_fun(*this, &HKLWindow::on_cell_TreeView_axes_max_edited)); //Fill the models from the diffractometerAxes - const darray_parameter *axes; - HklParameter **axis; - - axes = hkl_geometry_axes_get(this->_geometry); - darray_foreach(axis, *axes){ + axes = hkl_factory_axes_get(this->_factory, &axes_length); + for(i=0; iappend()); - row[_axeModelColumns.axis] = *axis; - row[_axeModelColumns.name] = hkl_parameter_name_get(*axis); + // this static_cast is wrong but for now it + // works. This should be fixed with the C version of + // the gui. + row[_axeModelColumns.axis] = const_cast(hkl_geometry_axis_get(this->_geometry, axes[i])); + row[_axeModelColumns.name] = axes[i]; } //Set the model for the TreeView @@ -496,21 +500,20 @@ void HKLWindow::set_up_TreeView_treeview1(void) { LOG; - int i=0; - const darray_parameter *axes; - HklParameter **axis; + size_t i, axes_length; + const char **axes; //Create the Columns if(_solutionModelColumns) delete _solutionModelColumns; - _solutionModelColumns = new SolutionModelColumns(_geometry); + _solutionModelColumns = new SolutionModelColumns(this->_factory); /* add the columns */ _treeview1->remove_all_columns(); - axes = hkl_geometry_axes_get(this->_geometry); - darray_foreach(axis, *axes) - _treeview1->append_column_numeric(hkl_parameter_name_get(*axis), - _solutionModelColumns->axes[i++], + axes = hkl_factory_axes_get(this->_factory, &axes_length); + for(i=0;iappend_column_numeric(axes[i], + _solutionModelColumns->axes[i], "%lf"); //Create the model from the columns @@ -1004,18 +1007,21 @@ void HKLWindow::updateSolutions(void) Gtk::ListStore::Row row; const darray_item *items = hkl_geometry_list_items_get(geometries); darray_foreach(item, *items){ - HklParameter **axis; - int j = 0; + const char **axes; + size_t j, axes_length; + const HklGeometry *geometry; row = *(_solutionModel->append()); row[_solutionModelColumns->index] = i++; row[_solutionModelColumns->item] = *item; - const HklGeometry *geometry = hkl_geometry_list_item_geometry_get(*item); - const darray_parameter *axes = hkl_geometry_axes_get(geometry); - darray_foreach(axis, *axes){ - row[_solutionModelColumns->axes[j++]] = \ - hkl_parameter_value_unit_get(*axis); + geometry = hkl_geometry_list_item_geometry_get(*item); + axes = hkl_factory_axes_get(this->_factory, &axes_length); + for(j=0; jaxes[j]] = hkl_parameter_value_unit_get(axis); } } } diff --git a/gui/hkl-gui.h b/gui/hkl-gui.h index 34b65249..47fd59d3 100644 --- a/gui/hkl-gui.h +++ b/gui/hkl-gui.h @@ -235,6 +235,7 @@ private: Gtk::Button *_button1; // close Gtk::ComboBox *_combobox1; // select diffractometer type + HklFactory *_factory; HklGeometry *_geometry; HklDetector *_detector; HklSample *_sample; diff --git a/hkl.h b/hkl.h index 0d73eeaf..c1eb2ac5 100644 --- a/hkl.h +++ b/hkl.h @@ -218,8 +218,6 @@ HKLAPI void hkl_geometry_free(HklGeometry *self) HKL_ARG_NONNULL(1); HKLAPI void hkl_geometry_set(HklGeometry *self, const HklGeometry *src) HKL_ARG_NONNULL(1, 2); -HKLAPI const darray_parameter *hkl_geometry_axes_get(const HklGeometry *self) HKL_ARG_NONNULL(1); - HKLAPI const HklParameter *hkl_geometry_axis_get(const HklGeometry *self, const char *name) HKL_ARG_NONNULL(1, 2); HKLAPI void hkl_geometry_axis_set(HklGeometry *self, const HklParameter *axis) HKL_ARG_NONNULL(1, 2); @@ -473,6 +471,9 @@ HKLAPI HklFactory *hkl_factory_get_by_name(const char *name) HKL_ARG_NONNULL(1); HKLAPI const char *hkl_factory_name(const HklFactory *self) HKL_ARG_NONNULL(1); +HKLAPI const char **hkl_factory_axes_get(const HklFactory *self, + size_t *length) HKL_ARG_NONNULL(1, 2); + HKLAPI HklGeometry *hkl_factory_create_new_geometry(const HklFactory *self) HKL_ARG_NONNULL(1); HKLAPI HklEngineList *hkl_factory_create_new_engine_list(const HklFactory *self) HKL_ARG_NONNULL(1); diff --git a/hkl/hkl-factory.c b/hkl/hkl-factory.c index 5d4f1f01..dce7359d 100644 --- a/hkl/hkl-factory.c +++ b/hkl/hkl-factory.c @@ -46,6 +46,8 @@ struct _HklFactory { const char *name; const char *description; + const char **axes; + size_t axes_length; HklFactoryGeometryFunction create_new_geometry; HklFactoryEngineListFunction create_new_engine_list; }; @@ -73,6 +75,22 @@ const char *hkl_factory_name(const HklFactory *self) return self->name; } +/** + * hkl_factory_axes_get: + * @self: the this ptr + * @length: (out caller-allocates): the length of the returned array + * + * get all the axes of the given geometry. + * + * Returns: (array length=length) (transfer none): array of the axes names. + **/ +const char **hkl_factory_axes_get(const HklFactory *self, + size_t *length) +{ + *length = self->axes_length; + return self->axes; +} + HklGeometry *hkl_factory_create_new_geometry(const HklFactory *self) { return self->create_new_geometry(self); @@ -86,6 +104,8 @@ HklEngineList *hkl_factory_create_new_engine_list(const HklFactory *self) #define REGISTER_DIFFRACTOMETER(name_, real_name_, description_) \ static HklFactory name_ = {.name = real_name_, \ .description = description_, \ + .axes = hkl_geometry_ ## name_ ## _axes, \ + .axes_length = ARRAY_SIZE(hkl_geometry_ ## name_ ## _axes), \ .create_new_geometry = &hkl_geometry_new_ ## name_, \ .create_new_engine_list = &hkl_engine_list_new_ ## name_ \ }; \ @@ -177,6 +197,8 @@ static void hkl_geometry_list_multiply_k6c_real(HklGeometryList *self, "\n" \ " + **tth** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_twoC_axes[] = {"omega", "tth"}; + static HklGeometry *hkl_geometry_new_twoC(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -215,6 +237,8 @@ REGISTER_DIFFRACTOMETER(twoC, "TwoC", HKL_GEOMETRY_TWOC_DESCRIPTION); "\n" \ " + **tth** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_eulerian4C_vertical_axes[] = {"omega", "chi", "phi", "tth"}; + static HklGeometry *hkl_geometry_new_eulerian4C_vertical(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -263,6 +287,8 @@ REGISTER_DIFFRACTOMETER(eulerian4C_vertical, "E4CV", HKL_GEOMETRY_EULERIAN4C_VER "\n" \ " + **tth** : rotation around the :math:`-\\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_kappa4C_vertical_axes[] = {"komega", "kappa", "kphi", "tth"}; + static HklGeometry *hkl_geometry_new_kappa4C_vertical(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -313,6 +339,8 @@ REGISTER_DIFFRACTOMETER(kappa4C_vertical, "K4CV", HKL_GEOMETRY_KAPPA4C_VERTICAL_ " + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \ " + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_eulerian6C_axes[] = {"mu", "omega", "chi", "phi", "gamma", "delta"}; + static HklGeometry *hkl_geometry_new_eulerian6C(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -366,6 +394,8 @@ REGISTER_DIFFRACTOMETER(eulerian6C, "E6C", HKL_GEOMETRY_EULERIAN6C_DESCRIPTION); " + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \ " + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_kappa6C_axes[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"}; + static HklGeometry *hkl_geometry_new_kappa6C(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -420,6 +450,8 @@ REGISTER_DIFFRACTOMETER(kappa6C, "K6C", HKL_GEOMETRY_KAPPA6C_DESCRIPTION); " + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \ " + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" +static const char* hkl_geometry_zaxis_axes[] = {"mu", "omega", "delta", "gamma"}; + static HklGeometry *hkl_geometry_new_zaxis(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -468,6 +500,8 @@ REGISTER_DIFFRACTOMETER(zaxis, "ZAXIS", HKL_GEOMETRY_TYPE_ZAXIS_DESCRIPTION); " + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \ " + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_soleil_sixs_med_2_2_axes[] = {"beta", "mu", "omega", "gamma", "delta"}; + static HklGeometry *hkl_geometry_new_soleil_sixs_med_2_2(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -515,6 +549,8 @@ REGISTER_DIFFRACTOMETER(soleil_sixs_med_2_2,"SOLEIL SIXS MED2+2", HKL_GEOMETRY_T "\n" \ " + **tth** : rotation around the :math:`\\vec{z}` direction (0, -1, 0)\n" +static const char* hkl_geometry_soleil_mars_axes[] = {"omega", "chi", "phi", "tth"}; + static HklGeometry *hkl_geometry_new_soleil_mars(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -561,6 +597,8 @@ REGISTER_DIFFRACTOMETER(soleil_mars, "SOLEIL MARS", HKL_GEOMETRY_TYPE_SOLEIL_MAR " + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \ " + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_soleil_sixs_med_1_2_axes[] = {"pitch", "mu", "gamma", "delta"}; + static HklGeometry *hkl_geometry_new_soleil_sixs_med_1_2(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -610,6 +648,8 @@ REGISTER_DIFFRACTOMETER(soleil_sixs_med_1_2, "SOLEIL SIXS MED1+2", HKL_GEOMETRY_ " + **delta** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \ " + **gamma** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_petra3_p09_eh2_axes[] = {"mu", "omega", "chi", "phi", "delta", "gamma"}; + static HklGeometry *hkl_geometry_new_petra3_p09_eh2(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -659,6 +699,8 @@ REGISTER_DIFFRACTOMETER(petra3_p09_eh2, "PETRA3 P09 EH2", HKL_GEOMETRY_TYPE_PETR " + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \ " + **eta_a** : rotation around the :math:`-\\vec{x}` direction (-1, 0, 0)\n" +static const char* hkl_geometry_soleil_sixs_med_2_3_axes[] = {"beta", "mu", "omega", "gamma", "delta", "eta_a"}; + static HklGeometry *hkl_geometry_new_soleil_sixs_med_2_3(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -708,6 +750,8 @@ REGISTER_DIFFRACTOMETER(soleil_sixs_med_2_3, "SOLEIL SIXS MED2+3", HKL_GEOMETRY_ "\n" \ " + **tth** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" +static const char* hkl_geometry_eulerian4C_horizontal_axes[] = {"omega", "chi", "phi", "tth"}; + static HklGeometry *hkl_geometry_new_eulerian4C_horizontal(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -754,6 +798,8 @@ REGISTER_DIFFRACTOMETER(eulerian4C_horizontal, "E4CH", HKL_GEOMETRY_TYPE_EULERIA " + **delta** : rotation around the :math:`-\\vec{y}` direction (0, 0, -1)\n" \ " + **gamma** : rotation around the :math:`\\vec{z}` direction (0, -1, 0)\n" +static const char* hkl_geometry_soleil_sirius_turret_axes[] = {"thetah", "alphay", "alphax", "delta", "gamma"}; + static HklGeometry *hkl_geometry_new_soleil_sirius_turret(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); @@ -802,6 +848,8 @@ REGISTER_DIFFRACTOMETER(soleil_sirius_turret, "SOLEIL SIRIUS TURRET", HKL_GEOMET " + **delta** : rotation around the :math:`-\\vec{z}` direction (0, 0, -1)\n" \ " + **gamma** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" +static const char* hkl_geometry_soleil_sirius_kappa_axes[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"}; + static HklGeometry *hkl_geometry_new_soleil_sirius_kappa(const HklFactory *factory) { HklGeometry *self = hkl_geometry_new(factory); diff --git a/hkl/hkl-geometry.c b/hkl/hkl-geometry.c index ec37302e..6ab1885f 100644 --- a/hkl/hkl-geometry.c +++ b/hkl/hkl-geometry.c @@ -294,11 +294,6 @@ void hkl_geometry_set(HklGeometry *self, const HklGeometry *src) darray_item(self->holders, i)->q = darray_item(src->holders, i)->q; } -const darray_parameter *hkl_geometry_axes_get(const HklGeometry *self) -{ - return &self->axes; -} - /** * hkl_geometry_axis_get: (skip) * @self: the this ptr diff --git a/tests/Makefile.am b/tests/Makefile.am index f13138ca..077c13a8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -36,8 +36,6 @@ LDADD = $(top_builddir)/hkl/libhkl.la \ $(top_builddir)/tests/tap/libtap.a \ $(GSL_LIBS) -AM_LDFLAGS=-static - if HKL3D all_tests += hkl3d-test-t diff --git a/tests/bindings/python.py b/tests/bindings/python.py index a8b5c5f8..6a037cff 100755 --- a/tests/bindings/python.py +++ b/tests/bindings/python.py @@ -22,7 +22,6 @@ Copyright (C) 2012-2013 Synchrotron SOLEIL Authors: Picca Frédéric-Emmanuel """ -import sys import math import unittest from gi.repository import GLib @@ -30,21 +29,31 @@ from gi.repository import Hkl class TestAPI(unittest.TestCase): + """Test all the Hkl API, if something brakes here it means that API + has changed !!! - @unittest.skip("factory not yet ready") + """ def test_factory_api(self): """ enforce the Factory API """ # factories dict factories = Hkl.factories() - for key, value in factories.iteritems(): + for key, factory in factories.iteritems(): self.assertTrue(type(key) == str) - self.assertTrue(type(value) == Hkl.Factory) - - kappa6C_factory = factories['Kappa6C'] - geometry = kappa6C_factory.create_new_geometry() - engines = kappa6C_factory.create_new_engine_list() + self.assertTrue(type(factory) == Hkl.Factory) + + # read all the axes names + axes = factory.axes_get() + self.assertTrue(type(axes) == list) + for axis in axes: + self.assertTrue(type(axis) == str) + + # create all the geometry and engines + geometry = factory.create_new_geometry() + self.assertTrue(type(geometry) == Hkl.Geometry) + engines = factory.create_new_engine_list() + self.assertTrue(type(engines) == Hkl.EngineList) def test_detector_api(self): """ diff --git a/tests/hkl-pseudoaxis-e6c-t.c b/tests/hkl-pseudoaxis-e6c-t.c index d4b88720..86988d90 100644 --- a/tests/hkl-pseudoaxis-e6c-t.c +++ b/tests/hkl-pseudoaxis-e6c-t.c @@ -25,7 +25,7 @@ #include "hkl-axis-private.h" /* temporary */ -#define CHECK_AXIS_VALUE(axis, value) fabs((value) - hkl_parameter_value_get(axis)) < HKL_EPSILON +#define CHECK_AXIS_VALUE(geometry, axis, value) fabs((value) - hkl_parameter_value_get(hkl_geometry_axis_get(geometry, axis))) < HKL_EPSILON static int hkl_geometry_list_check_geometry_unit(const HklGeometryList *self, @@ -41,15 +41,17 @@ static int hkl_geometry_list_check_geometry_unit(const HklGeometryList *self, int res = HKL_TRUE; darray_foreach(item, *items){ - const darray_parameter *axes = hkl_geometry_axes_get(hkl_geometry_list_item_geometry_get(*item)); + const HklGeometry *geometry; + + geometry = hkl_geometry_list_item_geometry_get(*item); res = HKL_TRUE; - res &= CHECK_AXIS_VALUE(darray_item(*axes, 0), mu * HKL_DEGTORAD); - res &= CHECK_AXIS_VALUE(darray_item(*axes, 1), omega * HKL_DEGTORAD); - res &= CHECK_AXIS_VALUE(darray_item(*axes, 2), chi * HKL_DEGTORAD); - res &= CHECK_AXIS_VALUE(darray_item(*axes, 3), phi * HKL_DEGTORAD); - res &= CHECK_AXIS_VALUE(darray_item(*axes, 4), gamma * HKL_DEGTORAD); - res &= CHECK_AXIS_VALUE(darray_item(*axes, 5), delta * HKL_DEGTORAD); + res &= CHECK_AXIS_VALUE(geometry, "mu", mu * HKL_DEGTORAD); + res &= CHECK_AXIS_VALUE(geometry, "omega", omega * HKL_DEGTORAD); + res &= CHECK_AXIS_VALUE(geometry, "chi", chi * HKL_DEGTORAD); + res &= CHECK_AXIS_VALUE(geometry, "phi", phi * HKL_DEGTORAD); + res &= CHECK_AXIS_VALUE(geometry, "gamma", gamma * HKL_DEGTORAD); + res &= CHECK_AXIS_VALUE(geometry, "delta", delta * HKL_DEGTORAD); if (res) break; diff --git a/tests/hkl-pseudoaxis-soleil-sixs-med-t.c b/tests/hkl-pseudoaxis-soleil-sixs-med-t.c index 9bbe0df5..1cea56ba 100644 --- a/tests/hkl-pseudoaxis-soleil-sixs-med-t.c +++ b/tests/hkl-pseudoaxis-soleil-sixs-med-t.c @@ -27,10 +27,10 @@ #include "hkl-axis-private.h" /* temporary */ #define GET_GAMMA(items, index) hkl_parameter_value_unit_get( \ - darray_item(*hkl_geometry_axes_get( \ - hkl_geometry_list_item_geometry_get( \ - darray_item(*(items), (index)))), \ - 3)) + hkl_geometry_axis_get( \ + hkl_geometry_list_item_geometry_get( \ + darray_item(*(items), (index))), \ + "gamma")) static void qper_qpar(void) diff --git a/tests/hkl3d-test-t.c b/tests/hkl3d-test-t.c index 2ad2a794..730aa111 100644 --- a/tests/hkl3d-test-t.c +++ b/tests/hkl3d-test-t.c @@ -34,7 +34,6 @@ static void check_model_validity(Hkl3D *hkl3d) int res; Hkl3DObject *obji; Hkl3DObject *objj; - const darray_parameter *axes; res = TRUE; @@ -57,8 +56,7 @@ static void check_model_validity(Hkl3D *hkl3d) } /* check the _movingObjects validity, all Hkl3DAxis must have a size of 1 */ - axes = hkl_geometry_axes_get(hkl3d->geometry->geometry); - for(i=0; igeometry->axes[i]->len == 1; ok(res == TRUE, "no identical objects"); -- 2.11.4.GIT