34 auto shape = sFactory.
createShape(shapeXML, addTypeTag);
37 if (shape->hasValidShape()) {
39 shape->setMaterial(mat);
42 std::ostringstream msg;
43 msg <<
"Object has invalid shape.";
45 msg <<
" TopRule = " << csgShape->topRule() <<
", number of surfaces = " << csgShape->getSurfacePtr().size()
48 throw std::runtime_error(msg.str());
58 "The workspace with which to associate the sample ");
60 "The XML that describes the shape");
#define DECLARE_ALGORITHM(classname)
IPeaksWorkspace_sptr workspace
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
void progress(double p, const std::string &msg="", double estimatedTime=0.0, int progressPrecision=0)
Sends ProgressNotification.
This class is shared by a few Workspace types and holds information related to a particular experimen...
const Sample & sample() const
Sample accessors.
Sample & mutableSample()
Writable version of the sample object.
void setShape(const Geometry::IObject_sptr &shape)
Update the shape of the object.
const Kernel::Material & getMaterial() const
Return the material (convenience method)
A property class for workspaces.
void exec() override
Execute the algorithm.
void init() override
Initialize the algorithm.
static void setSampleShape(API::ExperimentInfo &expt, const std::string &shapeXML, bool addTypeTag=true)
Set the shape via an XML string on the given experiment.
Constructive Solid Geometry object.
Class originally intended to be used with the DataHandling 'LoadInstrument' algorithm.
std::shared_ptr< CSGObject > createShape(Poco::XML::Element *pElem)
Creates a geometric object from a DOM-element-node pointing to an element whose child nodes contain t...
Validator to check that a property is not left empty.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
@ Input
An input workspace.