Ticket #7940 (closed: fixed)
A guide idf shape
Reported by: | Anders Markvardsen | Owned by: | Peter Parker |
---|---|---|---|
Priority: | major | Milestone: | Release 3.0 |
Component: | Framework | Keywords: | |
Cc: | jon.taylor@… | Blocked By: | #7970, #7971 |
Blocking: | Tester: | Samuel Jackson |
Description (last modified by Anders Markvardsen) (diff)
Most known cases of guides are the following special case of a hexahedron: a start rectangular aperture which in a continued fasion changes into an end rectangular aperture.
This common guide shape is called a tapered guide (Peter Willendrup)
Suggesion is to let user add the following xml in an IDF:
<tapered-guide id="some id string">
<aperture-start height="" width="" />
<length val="" />
<aperture-end height="" width="" />
<centre x="" y="" z="" />
<axis x="" y="" z="" />
<tapered-guide>
By default <centre> is x="0", y="0" and z="0".
When <centre x="0", y="0" and z="0" > the centre is the middle of the of the guide (i.e. half way along guide in the middle).
By default <axis> is x="0", y="0" and z="1" and this is the direction of the guide. Then the height attribute is along y-axis and width along x-axis
Both <centre> and <axis> are optional for the user to specify
Change History
comment:2 Changed 7 years ago by Anders Markvardsen
- Owner changed from Anders Markvardsen to Peter Parker
comment:3 Changed 7 years ago by Peter Parker
- Status changed from new to inprogress
Refs #7940 - Allow creation of "Guide" objects.
- Converts guide to hexahedron and uses pre-existing code to create shape.
- Updated schema.
- Added unit tests.
Changeset: ff0bae1cd1630f7ca4b8a847b85e6c862baba4e6
comment:4 Changed 7 years ago by Peter Parker
Marking as complete.
To test:
- Create a new instrument file and make use of the implemented "guide" shape. The Wiki has information about how to create IDFs. I have added a section on guides to the page about the various available shapes.
- Load the new instrument file using LoadEmptyInstrument and view it via the Instrument Window. Ensure that any guides appear as you would expect.
- Make sure that the default values for axis and centre are used where they have not been specified.
- Check to see that reasonable changes have been made to the code and that the unit tests offer decent coverage.
comment:5 Changed 7 years ago by Peter Parker
- Status changed from inprogress to verify
- Resolution set to fixed
comment:6 Changed 7 years ago by Anders Markvardsen
- Status changed from verify to verifying
- Tester set to Anders Markvardsen
comment:7 Changed 7 years ago by Peter Parker
- Status changed from verifying to reopened
- Resolution fixed deleted
The following changes are needed:
- In the case where a user adds incorrect axis or centre values, the error messages are swallowed and default values are used. This is not ideal; if the user makes an attempt at these values but fails, then the shape should be ignored as if it did not have a default.
- Bounding boxes for guide shapes would ideally be created automatically. Have a look to see how this is done for the simpler shapes within the code, and try and do likewise.
comment:9 Changed 7 years ago by Peter Parker
- Blocked By 7971 added
(In #7971) This ticket contains getOptionalShapElement(), which is required by two other tickets.
comment:10 Changed 7 years ago by Peter Parker
- Blocked By 7970 added
Waiting for 7970 to be tested and merged into master.
comment:11 Changed 7 years ago by Gesner Passos
- Status changed from reopened to closed
Merge remote-tracking branch 'origin/feature/7940_guide_idf_shape'
Full changeset: 6926e6fa24c1a2e47b00618ce616df36001b77b1
comment:13 Changed 7 years ago by Peter Parker
- Status changed from reopened to inprogress
Merge branch 'feature/7940_guide_idf_shape' into develop
Refs #7940
Conflicts:
Code/Mantid/instrument/Schema/IDFSchema.xsd
Changeset: e502b15ce251ebca7a789eb6e3e8a3e793b1d80c
comment:14 Changed 7 years ago by Peter Parker
Note that the above commit is a merge into Develop that for some reason Trac failed to pick up the individual changesets. They were as follows, in chronological order:
comment:15 Changed 7 years ago by Peter Parker
- Status changed from inprogress to verify
- Resolution set to fixed
To test, see comment 4.
Note:
- I have opened #8189 to create bounding boxes automatically for tapered guides (and hexahedrons).
- The <centre> tag is no longer defined as the middle of the shape, but as the middle of the start aperture.
comment:16 Changed 7 years ago by Samuel Jackson
- Status changed from verify to verifying
- Tester changed from Anders Markvardsen to Samuel Jackson
comment:17 Changed 7 years ago by Samuel Jackson
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/7940_guide_idf_shape'
Full changeset: 85ff8de7107cf65694ff9070d0f26ad65bc63596
comment:18 Changed 7 years ago by Samuel Jackson
Despite my best efforts, I failed to break anything. The drawing, rotations and translations all work how I would expect them to work. Using very small number for widths/heights appear to work as well. The default values are also used when a centre and/or axis aren't specified. Code looks good too.
comment:19 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8785