Added center property to Path to deal with rendering rotational axis.
This commit is contained in:
committed by
Yorik van Havre
parent
1f030de9ac
commit
cbd5f297f3
@@ -111,12 +111,24 @@ void PropertyPath::Save (Base::Writer &writer) const
|
||||
void PropertyPath::Restore(Base::XMLReader &reader)
|
||||
{
|
||||
reader.readElement("Path");
|
||||
std::string file (reader.getAttribute("file") );
|
||||
|
||||
std::string file (reader.getAttribute("file") );
|
||||
if (!file.empty()) {
|
||||
// initate a file read
|
||||
reader.addFile(file.c_str(),this);
|
||||
}
|
||||
|
||||
if (reader.hasAttribute("version")) {
|
||||
int version = reader.getAttributeAsInteger("version");
|
||||
if (version >= Toolpath::SchemaVersion) {
|
||||
reader.readElement("Center");
|
||||
double x = reader.getAttributeAsFloat("x");
|
||||
double y = reader.getAttributeAsFloat("y");
|
||||
double z = reader.getAttributeAsFloat("z");
|
||||
Base::Vector3d center(x, y, z);
|
||||
_Path.setCenter(center);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PropertyPath::SaveDocFile (Base::Writer &) const
|
||||
|
||||
Reference in New Issue
Block a user