Ticket #7970 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Alternative cuboid xml description

Reported by: Anders Markvardsen Owned by: Peter Parker
Priority: major Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By: #7971
Blocking: #7940 Tester: Gesner Passos

Description

Keep the <cuboid> name.

In addition allow the following elements:

<height val="" />

<width val="" />

<depth val="" />

<centre which default to middle />

<axis which default to z-axis />

Enforce in schema or else that user can only use on the other of the cuboid syntaxes

Change History

comment:1 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:2 Changed 7 years ago by Peter Parker

  • Milestone changed from Backlog to Release 3.0

comment:3 Changed 7 years ago by Peter Parker

  • Status changed from new to inprogress

Refs #7970 - Add alternate syntax for cuboid.

Added unit tests to cover the default axis and centre fields.

It is not possible to enforce an "either/or" syntax rule in the schema file without wrapping each syntax in its own pair of tags. We have to leave that job to the ShapeFactory when it parses the XML.

I would have preferred to keep CuboidCorners and the new parseCuboid function in an anonymous namespace, but had to list them in the header file to make use of the other member functions of the factory.

Changeset: edcd1d75ce0755a29e2021d1ec49317d785bb936

comment:4 Changed 7 years ago by Peter Parker

Refs #7970 - Merge branch.

Merge branch 'feature/7970_alternative_cuboid_xml_definition' into develop

Conflicts:

Code/Mantid/instrument/Schema/IDFSchema.xsd

Changeset: 7a3fe854097626b3783c0c70cd452e2ca5fdb02e

comment:5 Changed 7 years ago by Peter Parker

Refs #7970 - Fix non-Windows error.

Visual Studio failed to pick up the extra qualification in the header file.

Changeset: 8c07b445bb850f549f65e71ff1209662098677b7

comment:6 Changed 7 years ago by Peter Parker

  • Status changed from inprogress to verify
  • Resolution set to fixed
  • Blocking 7940 added

To Tester:

Ensure the new alternate syntax works as outlined in the ticket description, including the default use-cases. There is info on the wiki about defining shapes in IDF files for those who have not done it before.

Make sure my changes are sensible and as you would expect.

comment:7 Changed 7 years ago by Gesner Passos

  • Status changed from verify to verifying
  • Tester set to Gesner Passos

comment:8 Changed 7 years ago by Gesner Passos

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7970_alternative_cuboid_xml_definition'

Full changeset: 99e3f8ef6a9ec0699637221f5c96a2902d89817c

comment:9 Changed 7 years ago by Gesner Passos

I made a new IDF for SANS2D using the new cuboid and it resulted in the same positions. Besides, the code is clear about what it is doing.

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8815

Note: See TracTickets for help on using tickets.