Revert "FEM: Updated fix to constraint displacement reference deletion, update hide show, remove custom input writer, update vertice, edge, face selection."
This reverts commit ac4d466443.
This commit is contained in:
@@ -81,12 +81,11 @@ bool getConstraintPrerequisits(Fem::FemAnalysis **Analysis)
|
||||
}
|
||||
|
||||
//OvG: Visibility automation show parts and hide meshes on activation of a constraint
|
||||
std::string gethideMeshShowPartStr(std::string showConstr="")
|
||||
std::string gethideMeshShowPartStr()
|
||||
{
|
||||
return "for amesh in App.activeDocument().Objects:\n\
|
||||
if \""+showConstr+"\" == amesh.Name:\n\
|
||||
amesh.ViewObject.Visibility = True\n\
|
||||
elif \"Mesh\" in amesh.TypeId:\n\
|
||||
return
|
||||
"for amesh in App.activeDocument().Objects:\n\
|
||||
if \"Mesh\" in amesh.TypeId:\n\
|
||||
aparttoshow = amesh.Name.replace(\"_Mesh\",\"\")\n\
|
||||
for apart in App.activeDocument().Objects:\n\
|
||||
if aparttoshow == apart.Name:\n\
|
||||
@@ -292,7 +291,7 @@ void CmdFemConstraintBearing::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintBearing\",\"%s\")",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.Member = App.activeDocument().%s.Member + [App.activeDocument().%s]",Analysis->getNameInDocument(),Analysis->getNameInDocument(),FeatName.c_str());
|
||||
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts
|
||||
|
||||
updateActive();
|
||||
|
||||
@@ -334,7 +333,7 @@ void CmdFemConstraintFixed::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1
|
||||
doCommand(Doc,"App.activeDocument().%s.Member = App.activeDocument().%s.Member + [App.activeDocument().%s]",Analysis->getNameInDocument(),Analysis->getNameInDocument(),FeatName.c_str());
|
||||
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts
|
||||
|
||||
updateActive();
|
||||
|
||||
@@ -378,7 +377,7 @@ void CmdFemConstraintForce::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1
|
||||
doCommand(Doc,"App.activeDocument().%s.Member = App.activeDocument().%s.Member + [App.activeDocument().%s]",Analysis->getNameInDocument(),Analysis->getNameInDocument(),FeatName.c_str());
|
||||
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts
|
||||
|
||||
updateActive();
|
||||
|
||||
@@ -423,7 +422,7 @@ void CmdFemConstraintPressure::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().%s.Member = App.activeDocument().%s.Member + [App.activeDocument().%s]",
|
||||
Analysis->getNameInDocument(),Analysis->getNameInDocument(),FeatName.c_str());
|
||||
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts
|
||||
|
||||
updateActive();
|
||||
|
||||
@@ -464,7 +463,7 @@ void CmdFemConstraintGear::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().%s.Diameter = 100.0",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.Member = App.activeDocument().%s.Member + [App.activeDocument().%s]",Analysis->getNameInDocument(),Analysis->getNameInDocument(),FeatName.c_str());
|
||||
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts
|
||||
|
||||
updateActive();
|
||||
|
||||
@@ -510,7 +509,7 @@ void CmdFemConstraintPulley::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().%s.TensionForce = 100.0",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.Member = App.activeDocument().%s.Member + [App.activeDocument().%s]",Analysis->getNameInDocument(),Analysis->getNameInDocument(),FeatName.c_str());
|
||||
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts
|
||||
|
||||
updateActive();
|
||||
|
||||
@@ -552,7 +551,7 @@ void CmdFemConstraintDisplacement::activated(int iMsg)
|
||||
doCommand(Doc,"App.activeDocument().%s.Member = App.activeDocument().%s.Member + [App.activeDocument().%s]",
|
||||
Analysis->getNameInDocument(),Analysis->getNameInDocument(),FeatName.c_str());
|
||||
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts
|
||||
doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts
|
||||
|
||||
updateActive();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user