[TechDraw] Fix the projection type combobox and align all references to First angle and Third angle (#24762)
This commit is contained in:
@@ -53,7 +53,7 @@ App::PropertyFloatConstraint::Constraints DrawPage::scaleRange = {
|
||||
|
||||
PROPERTY_SOURCE(TechDraw::DrawPage, App::DocumentObject)
|
||||
|
||||
const char* DrawPage::ProjectionTypeEnums[] = {"First Angle", "Third Angle", nullptr};
|
||||
const char* DrawPage::ProjectionTypeEnums[] = {"First angle", "Third angle", nullptr};
|
||||
|
||||
DrawPage::DrawPage(void)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
App::PropertyBool KeepUpdated;
|
||||
|
||||
App::PropertyFloatConstraint Scale;
|
||||
App::PropertyEnumeration ProjectionType;// First or Third Angle
|
||||
App::PropertyEnumeration ProjectionType;// First or Third angle
|
||||
|
||||
App::PropertyInteger NextBalloonIndex;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
using namespace TechDraw;
|
||||
|
||||
const char* DrawProjGroup::ProjectionTypeEnums[] = {"First Angle", "Third Angle",
|
||||
const char* DrawProjGroup::ProjectionTypeEnums[] = {"First angle", "Third angle",
|
||||
"Default",//Use Page setting
|
||||
nullptr};
|
||||
|
||||
@@ -582,11 +582,11 @@ gp_Dir DrawProjGroup::vec2dir(Base::Vector3d v)
|
||||
Base::Vector3d DrawProjGroup::getXYPosition(const char* viewTypeCStr)
|
||||
{
|
||||
// Base::Console().message("DPG::getXYPosition(%s)\n", Label.getValue());
|
||||
// Third Angle: FTL T FTRight 0 1 2
|
||||
// Third angle: FTL T FTRight 0 1 2
|
||||
// L F Right Rear 3 4 5 6
|
||||
// FBL B FBRight 7 8 9
|
||||
//
|
||||
// First Angle: FBRight B FBL 0 1 2
|
||||
// First angle: FBRight B FBL 0 1 2
|
||||
// Right F L Rear 3 4 5 6
|
||||
// FTRight T FTL 7 8 9
|
||||
|
||||
@@ -740,7 +740,7 @@ double DrawProjGroup::getMaxColWidth(std::array<int, 3> list,
|
||||
|
||||
int DrawProjGroup::getViewIndex(const char* viewTypeCStr) const
|
||||
{
|
||||
// Determine layout - should be either "First Angle" or "Third Angle"
|
||||
// Determine layout - should be either "First angle" or "Third angle"
|
||||
const char* projType;
|
||||
DrawPage* dp = findParentPage();
|
||||
if (ProjectionType.isValue("Default")) {
|
||||
@@ -759,19 +759,19 @@ int DrawProjGroup::getViewIndex(const char* viewTypeCStr) const
|
||||
projType = ProjectionType.getValueAsString();
|
||||
}
|
||||
|
||||
if (strcmp(projType, "Third Angle") != 0 && strcmp(projType, "First Angle") != 0) {
|
||||
if (strcmp(projType, "Third angle") != 0 && strcmp(projType, "First angle") != 0) {
|
||||
throw Base::ValueError("Unknown Projection convention in DrawProjGroup::getViewIndex()");
|
||||
}
|
||||
|
||||
// Third Angle: FTL T FTRight 0 1 2
|
||||
// Third angle: FTL T FTRight 0 1 2
|
||||
// L F Right Rear 3 4 5 6
|
||||
// FBL B FBRight 7 8 9
|
||||
//
|
||||
// First Angle: FBRight B FBL 0 1 2
|
||||
// First angle: FBRight B FBL 0 1 2
|
||||
// Right F L Rear 3 4 5 6
|
||||
// FTRight T FTL 7 8 9
|
||||
|
||||
bool thirdAngle = (strcmp(projType, "Third Angle") == 0);
|
||||
bool thirdAngle = (strcmp(projType, "Third angle") == 0);
|
||||
if (strcmp(viewTypeCStr, "Front") == 0) {
|
||||
return 4;
|
||||
}
|
||||
@@ -814,7 +814,7 @@ void DrawProjGroup::arrangeViewPointers(
|
||||
viewPtrs[i] = nullptr;
|
||||
}
|
||||
|
||||
// Determine layout - should be either "First Angle" or "Third Angle"
|
||||
// Determine layout - should be either "First angle" or "Third angle"
|
||||
const char* projType;
|
||||
if (ProjectionType.isValue("Default")) {
|
||||
DrawPage* dp = findParentPage();
|
||||
@@ -836,22 +836,22 @@ void DrawProjGroup::arrangeViewPointers(
|
||||
}
|
||||
|
||||
// Iterate through views and populate viewPtrs
|
||||
if (strcmp(projType, "Third Angle") != 0 && strcmp(projType, "First Angle") != 0) {
|
||||
if (strcmp(projType, "Third angle") != 0 && strcmp(projType, "First angle") != 0) {
|
||||
Base::Console().warning("DPG: %s - unknown Projection convention: %s\n",
|
||||
getNameInDocument(), projType);
|
||||
throw Base::ValueError(
|
||||
"Unknown Projection convention in DrawProjGroup::arrangeViewPointers");
|
||||
}
|
||||
|
||||
// Third Angle: FTL T FTRight 0 1 2
|
||||
// Third angle: FTL T FTRight 0 1 2
|
||||
// L F Right Rear 3 4 5 6
|
||||
// FBL B FBRight 7 8 9
|
||||
//
|
||||
// First Angle: FBRight B FBL 0 1 2
|
||||
// First angle: FBRight B FBL 0 1 2
|
||||
// Right F L Rear 3 4 5 6
|
||||
// FTRight T FTL 7 8 9
|
||||
|
||||
bool thirdAngle = (strcmp(projType, "Third Angle") == 0);
|
||||
bool thirdAngle = (strcmp(projType, "Third angle") == 0);
|
||||
for (auto it : Views.getValues()) {
|
||||
auto oView(freecad_cast<DrawProjGroupItem*>(it));
|
||||
if (!oView) {
|
||||
|
||||
@@ -115,10 +115,10 @@ public:
|
||||
//return PyObject as DrawProjGroupPy
|
||||
PyObject *getPyObject() override;
|
||||
|
||||
/// Determines either "First Angle" or "Third Angle".
|
||||
/// Determines either "First angle" or "Third angle".
|
||||
App::Enumeration usedProjectionType();
|
||||
|
||||
/// Allowed projection types - either Document, First Angle or Third Angle
|
||||
/// Allowed projection types - either Document, First angle or Third angle
|
||||
static const char* ProjectionTypeEnums[];
|
||||
|
||||
bool hasAnchor();
|
||||
|
||||
@@ -151,7 +151,7 @@ bool Preferences::useGlobalDecimals()
|
||||
|
||||
int Preferences::projectionAngle()
|
||||
{
|
||||
return getPreferenceGroup("General")->GetInt("ProjectionAngle", 0); //First Angle
|
||||
return getPreferenceGroup("General")->GetInt("ProjectionAngle", 0); //First angle
|
||||
}
|
||||
|
||||
bool Preferences::groupAutoDistribute()
|
||||
|
||||
@@ -342,12 +342,12 @@ for ProjectionGroups</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>First-angle</string>
|
||||
<string>First angle</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Third-angle</string>
|
||||
<string>Third angle</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -633,11 +633,11 @@ void TaskProjGroup::changeEvent(QEvent *event)
|
||||
|
||||
const char * TaskProjGroup::viewChkIndexToCStr(int index)
|
||||
{
|
||||
// Third Angle: FTL T FTRight
|
||||
// Third angle: FTL T FTRight
|
||||
// L F Right Rear
|
||||
// FBL B FBRight
|
||||
//
|
||||
// First Angle: FBRight B FBL
|
||||
// First angle: FBRight B FBL
|
||||
// Right F L Rear
|
||||
// FTRight T FTL
|
||||
|
||||
@@ -692,10 +692,10 @@ bool TaskProjGroup::useThirdAngle()
|
||||
return thirdAngle;
|
||||
}
|
||||
|
||||
if (multiView->usedProjectionType().isValue("Third Angle")) {
|
||||
if (multiView->usedProjectionType().isValue("Third angle")) {
|
||||
thirdAngle = true;
|
||||
} else if (multiView->usedProjectionType().isValue("Default") &&
|
||||
page->ProjectionType.isValue("Third Angle")) {
|
||||
page->ProjectionType.isValue("Third angle")) {
|
||||
thirdAngle = true;
|
||||
}
|
||||
return thirdAngle;
|
||||
|
||||
Reference in New Issue
Block a user