[PD] Change some strings and comments in loft code
Suggestions by @donovaly.
This commit is contained in:
@@ -153,7 +153,7 @@ App::DocumentObjectExecReturn *Loft::execute(void)
|
||||
profilePoint = ex.Current();
|
||||
}
|
||||
if (i > 1)
|
||||
return new App::DocumentObjectExecReturn("Loft: Only one isolated point is needed if using a sketch with isolated points for section");
|
||||
return new App::DocumentObjectExecReturn("Loft: When using points for profile/sections, the sketch should have a single point");
|
||||
}
|
||||
|
||||
bool isLastSectionVertex = false;
|
||||
@@ -179,7 +179,7 @@ App::DocumentObjectExecReturn *Loft::execute(void)
|
||||
wires.push_back(ex.Current());
|
||||
}
|
||||
if (j > 1)
|
||||
return new App::DocumentObjectExecReturn("Loft: Only one isolated point is needed if using a sketch with isolated points for section");
|
||||
return new App::DocumentObjectExecReturn("Loft: When using points for profile/sections, the sketch should have a single point");
|
||||
}
|
||||
if (!isLastSectionVertex && numWiresAdded < wiresections.size())
|
||||
return new App::DocumentObjectExecReturn("Loft: Sections need to have the same amount of inner wires as the base section");
|
||||
|
||||
@@ -1005,11 +1005,14 @@ void prepareProfileBased(PartDesign::Body *pcActiveBody, Gui::Command* cmd, cons
|
||||
|
||||
auto objCmd = Gui::Command::getObjectCmd(feature);
|
||||
|
||||
// run the command in console to set the profile (without selected subelements)
|
||||
auto runProfileCmd =
|
||||
[=]() {
|
||||
FCMD_OBJ_CMD(Feat,"Profile = " << objCmd);
|
||||
};
|
||||
|
||||
// run the command in console to set the profile with selected subelements
|
||||
// useful to set, say, a face of a solid as the "profile"
|
||||
auto runProfileCmdWithSubs =
|
||||
[=]() {
|
||||
std::ostringstream ss;
|
||||
@@ -1023,6 +1026,9 @@ void prepareProfileBased(PartDesign::Body *pcActiveBody, Gui::Command* cmd, cons
|
||||
// when a vertex is first selected
|
||||
auto subName = subs.empty() ? "" : subs.front();
|
||||
|
||||
// `ProfileBased::getProfileShape()` and other methods will return
|
||||
// just the sub-shapes if they are set. So when whole sketches are
|
||||
// desired, don not set sub-values.
|
||||
if (feature->isDerivedFrom(Part::Part2DObject::getClassTypeId()) &&
|
||||
!(subName.size() > 6 && subName.substr(0,6) == "Vertex"))
|
||||
runProfileCmd();
|
||||
|
||||
Reference in New Issue
Block a user