Add Part_RegularPolygon,
regular polygon edge in Part workbench "create primitives", Add icons Part_Polygon and Part_Spline
This commit is contained in:
committed by
Yorik van Havre
parent
3be45a18a5
commit
cb540afa2e
@@ -259,6 +259,7 @@ DlgPrimitives::DlgPrimitives(QWidget* parent)
|
||||
ui.edgeY2->setMinimum(INT_MIN);
|
||||
ui.edgeZ2->setMaximum(INT_MAX);
|
||||
ui.edgeZ2->setMinimum(INT_MIN);
|
||||
// RegularPolygon
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -593,6 +594,18 @@ void DlgPrimitives::createPrimitive(const QString& placement)
|
||||
.arg(ui.edgeZ2->value(),0,'f',2)
|
||||
.arg(placement);
|
||||
}
|
||||
else if (ui.comboBox1->currentIndex() == 14) { // RegularPolygon
|
||||
name = QString::fromAscii(doc->getUniqueObjectName("RegularPolygon").c_str());
|
||||
cmd = QString::fromAscii(
|
||||
"App.ActiveDocument.addObject(\"Part::RegularPolygon\",\"%1\")\n"
|
||||
"App.ActiveDocument.%1.NumberOfSides=%2\n"
|
||||
"App.ActiveDocument.%1.Radius=%3\n"
|
||||
"App.ActiveDocument.%1.Placement=%5\n")
|
||||
.arg(name)
|
||||
.arg(ui.regularPolygonNumberOfSides->value())
|
||||
.arg(ui.regularPolygonRadius->value(),0,'f',2)
|
||||
.arg(placement);
|
||||
}
|
||||
|
||||
// Execute the Python block
|
||||
QString prim = tr("Create %1").arg(ui.comboBox1->currentText());
|
||||
|
||||
Reference in New Issue
Block a user