Closed matthew-d-jones closed 6 years ago
@zjttoefs Example code now demonstrates outputting complete geometry to an OFF file; I've updated the PR description.
Looked a bit more in detail. I've pushed a commit with a class name that's at least somewhat better. I've also changed the title. No need for "example". Still need to confirm it actually merges multiple OFF buckets correctly (and if so under which circumstances).
Example code demonstrates how to write shape information from an OFF file to an
NXoff_geometry
group in a NeXus file. It also shows how to output entire instrument geometry, comprisingNXoff_geometry
,NXcylindrical_geometry
andNXtransformations
as a single OFF file which can then be opened in CAD software.A file passes as compatible with the feature if it has at least one
NXoff_geometry
orNXcylindrical_geometry
group containing the expected datasets for thatNXclass
.Includes example file
example_nx_geometry.nxs
To Test: You can test by adding these lines to
8CB1EBAE3B2DA51D/recipe.py
and running it:I've been using Geomview to render OFF files. The download page contains OSX build instructions and rpm and deb packages, or on Ubuntu you can just
apt install geomview
.