|
|
|
@ -33,6 +33,34 @@ void CFDStructDataSolverSportsAttributesItemManager::saveDataToDom(rapidjson::Do
|
|
|
|
|
jsonAdd(dom, m_RotationSpeed, {"region", 0, "motion", this->getId(), "meshMotion", "rigid", "speed"});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverSportsAttributesItemManager::readDataFromDom(rapidjson::Document &dom) {
|
|
|
|
|
QVariant temp;
|
|
|
|
|
|
|
|
|
|
// id应该是在读取之前就由manager创建
|
|
|
|
|
// jsonAdd(dom, m_id, {"region", 0, "motion", this->getId(), "id"});
|
|
|
|
|
|
|
|
|
|
jsonRead(dom, temp, {"region", 0, "motion", this->getId(), "meshMotion", "name"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_MotionName = temp.toString();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp, {"region", 0, "motion", this->getId(), "meshMotion", "MotionType"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_MotionType = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp, {"region", 0, "motion", this->getId(), "meshMotion", "rigid", "origin"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_RotationAxisOrigin = temp.toString();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp, {"region", 0, "motion", this->getId(), "meshMotion", "rigid", "axial"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_RotationAxisDirection = temp.toString();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp, {"region", 0, "motion", this->getId(), "meshMotion", "rigid", "speed"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_RotationSpeed = temp.toDouble();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genMovingFrameModeUIConfig() {
|
|
|
|
|
return new CUIConfig({
|
|
|
|
|
{"type", "Widget"},
|
|
|
|
|