36 if (shape->hasValidShape()) {
38 shape->setMaterial(mat);
41 std::ostringstream msg;
42 msg <<
"Object has invalid shape.";
44 msg <<
" TopRule = " << csgShape->topRule() <<
", number of surfaces = " << csgShape->getSurfacePtr().size()
47 throw std::runtime_error(msg.str());
57 "The workspace with which to associate the sample ");
59 "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)
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.