Make arc default dimenision (radius vs diameter) a configuration option.
This commit is contained in:
parent
1a71ca745a
commit
1f8b3f2589
@ -70,6 +70,10 @@ void TextWindow::ScreenChangeExportOffset(int link, uint32_t v) {
|
|||||||
SS.TW.edit.meaning = Edit::EXPORT_OFFSET;
|
SS.TW.edit.meaning = Edit::EXPORT_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextWindow::ScreenChangeArcDimDefault(int link, uint32_t v) {
|
||||||
|
SS.arcDimDefaultDiameter = !SS.arcDimDefaultDiameter;
|
||||||
|
}
|
||||||
|
|
||||||
void TextWindow::ScreenChangeFixExportColors(int link, uint32_t v) {
|
void TextWindow::ScreenChangeFixExportColors(int link, uint32_t v) {
|
||||||
SS.fixExportColors = !SS.fixExportColors;
|
SS.fixExportColors = !SS.fixExportColors;
|
||||||
}
|
}
|
||||||
@ -344,6 +348,9 @@ void TextWindow::ShowConfiguration() {
|
|||||||
Printf(false, " %Fd%f%Ll%s edit newly added dimensions%E",
|
Printf(false, " %Fd%f%Ll%s edit newly added dimensions%E",
|
||||||
&ScreenChangeImmediatelyEditDimension,
|
&ScreenChangeImmediatelyEditDimension,
|
||||||
SS.immediatelyEditDimension ? CHECK_TRUE : CHECK_FALSE);
|
SS.immediatelyEditDimension ? CHECK_TRUE : CHECK_FALSE);
|
||||||
|
Printf(false, " %Fd%f%Ll%s arc default is diameter%E",
|
||||||
|
&ScreenChangeArcDimDefault,
|
||||||
|
SS.arcDimDefaultDiameter ? CHECK_TRUE : CHECK_FALSE);
|
||||||
Printf(false, "");
|
Printf(false, "");
|
||||||
Printf(false, "%Ft autosave interval (in minutes)%E");
|
Printf(false, "%Ft autosave interval (in minutes)%E");
|
||||||
Printf(false, "%Ba %d %Fl%Ll%f[change]%E",
|
Printf(false, "%Ba %d %Fl%Ll%f[change]%E",
|
||||||
|
@ -237,7 +237,9 @@ void Constraint::MenuConstrain(Command id) {
|
|||||||
c.type = Type::DIAMETER;
|
c.type = Type::DIAMETER;
|
||||||
c.entityA = gs.entity[0];
|
c.entityA = gs.entity[0];
|
||||||
Entity* arc = SK.GetEntity(gs.entity[0]);
|
Entity* arc = SK.GetEntity(gs.entity[0]);
|
||||||
if (arc->type == EntityBase::Type::ARC_OF_CIRCLE) {
|
if ((arc->type == EntityBase::Type::ARC_OF_CIRCLE)
|
||||||
|
&& (!SS.arcDimDefaultDiameter))
|
||||||
|
{
|
||||||
c.other = true;
|
c.other = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -69,6 +69,8 @@ void SolveSpaceUI::Init() {
|
|||||||
exportScale = settings->ThawFloat("ExportScale", 1.0);
|
exportScale = settings->ThawFloat("ExportScale", 1.0);
|
||||||
// Export offset (cutter radius comp)
|
// Export offset (cutter radius comp)
|
||||||
exportOffset = settings->ThawFloat("ExportOffset", 0.0);
|
exportOffset = settings->ThawFloat("ExportOffset", 0.0);
|
||||||
|
// Dimensions on arcs default to diameter vs radius
|
||||||
|
arcDimDefaultDiameter = settings->ThawBool("ArcDimDefaultDiameter", false);
|
||||||
// Rewrite exported colors close to white into black (assuming white bg)
|
// Rewrite exported colors close to white into black (assuming white bg)
|
||||||
fixExportColors = settings->ThawBool("FixExportColors", true);
|
fixExportColors = settings->ThawBool("FixExportColors", true);
|
||||||
// Export background color
|
// Export background color
|
||||||
@ -250,6 +252,8 @@ void SolveSpaceUI::Exit() {
|
|||||||
settings->FreezeFloat("ExportScale", exportScale);
|
settings->FreezeFloat("ExportScale", exportScale);
|
||||||
// Export offset (cutter radius comp)
|
// Export offset (cutter radius comp)
|
||||||
settings->FreezeFloat("ExportOffset", exportOffset);
|
settings->FreezeFloat("ExportOffset", exportOffset);
|
||||||
|
// Rewrite the default arc dimension setting
|
||||||
|
settings->FreezeBool("ArcDimDefaultDiameter", arcDimDefaultDiameter);
|
||||||
// Rewrite exported colors close to white into black (assuming white bg)
|
// Rewrite exported colors close to white into black (assuming white bg)
|
||||||
settings->FreezeBool("FixExportColors", fixExportColors);
|
settings->FreezeBool("FixExportColors", fixExportColors);
|
||||||
// Export background color
|
// Export background color
|
||||||
|
@ -573,6 +573,7 @@ public:
|
|||||||
double gridSpacing;
|
double gridSpacing;
|
||||||
double exportScale;
|
double exportScale;
|
||||||
double exportOffset;
|
double exportOffset;
|
||||||
|
bool arcDimDefaultDiameter;
|
||||||
bool fixExportColors;
|
bool fixExportColors;
|
||||||
bool exportBackgroundColor;
|
bool exportBackgroundColor;
|
||||||
bool drawBackFaces;
|
bool drawBackFaces;
|
||||||
|
1
src/ui.h
1
src/ui.h
@ -442,6 +442,7 @@ public:
|
|||||||
static void ScreenShowEditView(int link, uint32_t v);
|
static void ScreenShowEditView(int link, uint32_t v);
|
||||||
static void ScreenGoToWebsite(int link, uint32_t v);
|
static void ScreenGoToWebsite(int link, uint32_t v);
|
||||||
|
|
||||||
|
static void ScreenChangeArcDimDefault(int link, uint32_t v);
|
||||||
static void ScreenChangeFixExportColors(int link, uint32_t v);
|
static void ScreenChangeFixExportColors(int link, uint32_t v);
|
||||||
static void ScreenChangeExportBackgroundColor(int link, uint32_t v);
|
static void ScreenChangeExportBackgroundColor(int link, uint32_t v);
|
||||||
static void ScreenChangeBackFaces(int link, uint32_t v);
|
static void ScreenChangeBackFaces(int link, uint32_t v);
|
||||||
|
Loading…
Reference in New Issue
Block a user