Merge branch 'master' into master
This commit is contained in:
@@ -75,7 +75,7 @@ dependencies:
|
||||
- ninja
|
||||
- numpy
|
||||
- occt==7.6.3
|
||||
- openssl==3.0.8
|
||||
- openssl==3.0.*
|
||||
- pcl
|
||||
- pip
|
||||
- pivy
|
||||
|
||||
@@ -231,9 +231,9 @@ EXPO [eE][-+]?[0-9]+
|
||||
"cd" COUNTCHARS; yylval.quantity.scaler = Quantity::Candela; yylval.quantity.unitStr = yytext; return UNIT; // Candela (internal standard luminous intensity)
|
||||
|
||||
"in" COUNTCHARS; yylval.quantity.scaler = Quantity::Inch; yylval.quantity.unitStr = yytext; return UNIT; // inch
|
||||
"\"" COUNTCHARS; yylval.quantity.scaler = Quantity::Inch; yylval.quantity.unitStr = yytext; return UNIT; // inch
|
||||
"\"" COUNTCHARS; yylval.quantity.scaler = Quantity::Inch; yylval.quantity.unitStr = yytext; return USUNIT; // inch
|
||||
"ft" COUNTCHARS; yylval.quantity.scaler = Quantity::Foot; yylval.quantity.unitStr = yytext; return UNIT; // foot
|
||||
"'" COUNTCHARS; yylval.quantity.scaler = Quantity::Foot; yylval.quantity.unitStr = yytext; return UNIT; // foot
|
||||
"'" COUNTCHARS; yylval.quantity.scaler = Quantity::Foot; yylval.quantity.unitStr = yytext; return USUNIT; // foot
|
||||
"thou" COUNTCHARS; yylval.quantity.scaler = Quantity::Thou; yylval.quantity.unitStr = yytext; return UNIT; // thou (in/1000)
|
||||
"mil" COUNTCHARS; yylval.quantity.scaler = Quantity::Thou; yylval.quantity.unitStr = yytext; return UNIT; // mil (the thou in US)
|
||||
"yd" COUNTCHARS; yylval.quantity.scaler = Quantity::Yard; yylval.quantity.unitStr = yytext; return UNIT; // yard
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,9 @@
|
||||
/* A Bison parser, made by GNU Bison 3.0.4. */
|
||||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -15,7 +16,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
@@ -30,6 +31,10 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
|
||||
especially those whose name start with YY_ or yy_. They are
|
||||
private implementation details that can be changed or removed. */
|
||||
|
||||
#ifndef YY_YY_EXPRESSIONPARSER_TAB_H_INCLUDED
|
||||
# define YY_YY_EXPRESSIONPARSER_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
@@ -40,35 +45,41 @@
|
||||
extern int yydebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
/* Token kinds. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
FUNC = 258,
|
||||
ONE = 259,
|
||||
NUM = 260,
|
||||
IDENTIFIER = 261,
|
||||
UNIT = 262,
|
||||
INTEGER = 263,
|
||||
CONSTANT = 264,
|
||||
CELLADDRESS = 265,
|
||||
EQ = 266,
|
||||
NEQ = 267,
|
||||
LT = 268,
|
||||
GT = 269,
|
||||
GTE = 270,
|
||||
LTE = 271,
|
||||
STRING = 272,
|
||||
MINUSSIGN = 273,
|
||||
PROPERTY_REF = 274,
|
||||
DOCUMENT = 275,
|
||||
OBJECT = 276,
|
||||
EXPONENT = 277,
|
||||
NUM_AND_UNIT = 278,
|
||||
NEG = 279,
|
||||
POS = 280
|
||||
YYEMPTY = -2,
|
||||
YYEOF = 0, /* "end of file" */
|
||||
YYerror = 256, /* error */
|
||||
YYUNDEF = 257, /* "invalid token" */
|
||||
FUNC = 258, /* FUNC */
|
||||
ONE = 259, /* ONE */
|
||||
NUM = 260, /* NUM */
|
||||
IDENTIFIER = 261, /* IDENTIFIER */
|
||||
UNIT = 262, /* UNIT */
|
||||
USUNIT = 263, /* USUNIT */
|
||||
INTEGER = 264, /* INTEGER */
|
||||
CONSTANT = 265, /* CONSTANT */
|
||||
CELLADDRESS = 266, /* CELLADDRESS */
|
||||
EQ = 267, /* EQ */
|
||||
NEQ = 268, /* NEQ */
|
||||
LT = 269, /* LT */
|
||||
GT = 270, /* GT */
|
||||
GTE = 271, /* GTE */
|
||||
LTE = 272, /* LTE */
|
||||
STRING = 273, /* STRING */
|
||||
MINUSSIGN = 274, /* MINUSSIGN */
|
||||
PROPERTY_REF = 275, /* PROPERTY_REF */
|
||||
DOCUMENT = 276, /* DOCUMENT */
|
||||
OBJECT = 277, /* OBJECT */
|
||||
EXPONENT = 278, /* EXPONENT */
|
||||
NUM_AND_UNIT = 279, /* NUM_AND_UNIT */
|
||||
NEG = 280, /* NEG */
|
||||
POS = 281 /* POS */
|
||||
};
|
||||
typedef enum yytokentype yytoken_kind_t;
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
@@ -76,6 +87,8 @@ extern int yydebug;
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
|
||||
#endif /* !YY_YY_EXPRESSIONPARSER_TAB_H_INCLUDED */
|
||||
|
||||
@@ -40,7 +40,7 @@ std::stack<FunctionExpression::Function> functions; /**< Function
|
||||
%token ONE
|
||||
%token NUM
|
||||
%token IDENTIFIER
|
||||
%token UNIT
|
||||
%token UNIT USUNIT
|
||||
%token INTEGER
|
||||
%token CONSTANT
|
||||
%token CELLADDRESS
|
||||
@@ -49,8 +49,8 @@ std::stack<FunctionExpression::Function> functions; /**< Function
|
||||
%token DOCUMENT OBJECT
|
||||
%token EXPONENT
|
||||
%type <arguments> args
|
||||
%type <expr> input exp unit_exp cond indexable
|
||||
%type <quantity> UNIT
|
||||
%type <expr> input unit_num us_building_unit other_unit exp unit_exp cond indexable
|
||||
%type <quantity> UNIT USUNIT
|
||||
%type <string> id_or_cell STRING IDENTIFIER CELLADDRESS
|
||||
%type <ivalue> INTEGER
|
||||
%type <string> PROPERTY_REF
|
||||
@@ -79,28 +79,32 @@ std::stack<FunctionExpression::Function> functions; /**< Function
|
||||
%destructor { std::vector<Expression*>::const_iterator i = $$.begin(); while (i != $$.end()) { delete *i; ++i; } } args
|
||||
|
||||
%start input
|
||||
|
||||
%%
|
||||
|
||||
input: exp { ScanResult = $1; valueExpression = true; }
|
||||
| unit_exp { ScanResult = $1; unitExpression = true; }
|
||||
|
||||
input: exp { ScanResult = $1; valueExpression = true; }
|
||||
| unit_exp { ScanResult = $1; unitExpression = true; }
|
||||
;
|
||||
|
||||
exp: num { $$ = $1; }
|
||||
| num unit_exp %prec NUM_AND_UNIT { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::UNIT, $2); }
|
||||
unit_num: num unit_exp %prec NUM_AND_UNIT { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::UNIT, $2); }
|
||||
| num us_building_unit num us_building_unit %prec NUM_AND_UNIT { $$ = new OperatorExpression(DocumentObject, new OperatorExpression(DocumentObject, $1, OperatorExpression::UNIT, $2), OperatorExpression::ADD, new OperatorExpression(DocumentObject, $3, OperatorExpression::UNIT, $4));}
|
||||
;
|
||||
|
||||
exp: num { $$ = $1; }
|
||||
| unit_num { $$ = $1; }
|
||||
| STRING { $$ = new StringExpression(DocumentObject, $1); }
|
||||
| identifier { $$ = new VariableExpression(DocumentObject, $1); }
|
||||
| MINUSSIGN exp %prec NEG { $$ = new OperatorExpression(DocumentObject, $2, OperatorExpression::NEG, new NumberExpression(DocumentObject, Quantity(-1))); }
|
||||
| '+' exp %prec POS { $$ = new OperatorExpression(DocumentObject, $2, OperatorExpression::POS, new NumberExpression(DocumentObject, Quantity(1))); }
|
||||
| exp '+' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::ADD, $3); }
|
||||
| exp '+' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::ADD, $3); }
|
||||
| exp MINUSSIGN exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::SUB, $3); }
|
||||
| exp '*' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::MUL, $3); }
|
||||
| exp '/' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::DIV, $3); }
|
||||
| exp '%' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::MOD, $3); }
|
||||
| exp '*' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::MUL, $3); }
|
||||
| exp '/' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::DIV, $3); }
|
||||
| exp '%' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::MOD, $3); }
|
||||
| exp '/' unit_exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::DIV, $3); }
|
||||
| exp '^' exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::POW, $3); }
|
||||
| indexable { $$ = $1; }
|
||||
| FUNC args ')' { $$ = new FunctionExpression(DocumentObject, $1.first, std::move($1.second), $2); }
|
||||
| indexable { $$ = $1; }
|
||||
| FUNC args ')' { $$ = new FunctionExpression(DocumentObject, $1.first, std::move($1.second), $2);}
|
||||
| cond '?' exp ':' exp { $$ = new ConditionalExpression(DocumentObject, $1, $3, $5); }
|
||||
| '(' exp ')' { $$ = $2; }
|
||||
;
|
||||
@@ -130,7 +134,11 @@ cond: exp EQ exp { $$ = new OperatorExpression(Do
|
||||
| '(' cond ')' { $$ = $2; }
|
||||
;
|
||||
|
||||
unit_exp: UNIT { $$ = new UnitExpression(DocumentObject, $1.scaler, $1.unitStr ); }
|
||||
us_building_unit: USUNIT { $$ = new UnitExpression(DocumentObject, $1.scaler, $1.unitStr ); }
|
||||
other_unit: UNIT { $$ = new UnitExpression(DocumentObject, $1.scaler, $1.unitStr ); }
|
||||
|
||||
unit_exp: other_unit { $$ = $1; }
|
||||
| us_building_unit { $$ = $1; }
|
||||
| unit_exp '/' unit_exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::DIV, $3); }
|
||||
| unit_exp '*' unit_exp { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::MUL, $3); }
|
||||
| unit_exp '^' integer { $$ = new OperatorExpression(DocumentObject, $1, OperatorExpression::POW, new NumberExpression(DocumentObject, Quantity((double)$3))); }
|
||||
|
||||
@@ -9131,7 +9131,7 @@ COUNTCHARS; yylval.quantity.scaler = Quantity::Inch; yylval.quan
|
||||
case 49:
|
||||
YY_RULE_SETUP
|
||||
#line 234 "ExpressionParser.l"
|
||||
COUNTCHARS; yylval.quantity.scaler = Quantity::Inch; yylval.quantity.unitStr = yytext; return UNIT; // inch
|
||||
COUNTCHARS; yylval.quantity.scaler = Quantity::Inch; yylval.quantity.unitStr = yytext; return USUNIT; // inch
|
||||
YY_BREAK
|
||||
case 50:
|
||||
YY_RULE_SETUP
|
||||
@@ -9141,7 +9141,7 @@ COUNTCHARS; yylval.quantity.scaler = Quantity::Foot; yylval.quan
|
||||
case 51:
|
||||
YY_RULE_SETUP
|
||||
#line 236 "ExpressionParser.l"
|
||||
COUNTCHARS; yylval.quantity.scaler = Quantity::Foot; yylval.quantity.unitStr = yytext; return UNIT; // foot
|
||||
COUNTCHARS; yylval.quantity.scaler = Quantity::Foot; yylval.quantity.unitStr = yytext; return USUNIT; // foot
|
||||
YY_BREAK
|
||||
case 52:
|
||||
YY_RULE_SETUP
|
||||
|
||||
@@ -358,18 +358,18 @@ using PyMethodDef = struct PyMethodDef;
|
||||
#define FC_LOG_LEVEL_INIT(_tag,...) \
|
||||
_FC_LOG_LEVEL_INIT(FC_LOG_INSTANCE, _tag, ## __VA_ARGS__)
|
||||
|
||||
#define __FC_PRINT(_instance,_l,_func,_msg,_file,_line) do{\
|
||||
#define __FC_PRINT(_instance,_l,_func,_notifier,_msg,_file,_line) do{\
|
||||
if(_instance.isEnabled(_l)) {\
|
||||
std::stringstream _str;\
|
||||
_instance.prefix(_str,_file,_line) << _msg;\
|
||||
if(_instance.add_eol) \
|
||||
_str<<std::endl;\
|
||||
Base::Console()._func("",_str.str().c_str());\
|
||||
Base::Console()._func(_notifier,_str.str().c_str());\
|
||||
if(_instance.refresh) Base::Console().Refresh();\
|
||||
}\
|
||||
}while(0)
|
||||
|
||||
#define _FC_PRINT(_instance,_l,_func,_msg) __FC_PRINT(_instance,_l,_func,_msg,__FILE__,__LINE__)
|
||||
#define _FC_PRINT(_instance,_l,_func,_msg) __FC_PRINT(_instance,_l,_func,"",_msg,__FILE__,__LINE__)
|
||||
|
||||
#define FC_MSG(_msg) _FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_MSG,Message,_msg)
|
||||
#define FC_WARN(_msg) _FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_WARN,DeveloperWarning,_msg)
|
||||
@@ -377,11 +377,11 @@ using PyMethodDef = struct PyMethodDef;
|
||||
#define FC_LOG(_msg) _FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_LOG,Log,_msg)
|
||||
#define FC_TRACE(_msg) _FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_TRACE,Log,_msg)
|
||||
|
||||
#define _FC_MSG(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_MSG,Message,_msg,_file,_line)
|
||||
#define _FC_WARN(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_WARN,DeveloperWarning,_msg,_file,_line)
|
||||
#define _FC_ERR(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_ERR,DeveloperError,_msg,_file,_line)
|
||||
#define _FC_LOG(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_LOG,Log,_msg,_file,_line)
|
||||
#define _FC_TRACE(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_TRACE,Log,_msg,_file,_line)
|
||||
#define _FC_MSG(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_MSG,Message,"",_msg,_file,_line)
|
||||
#define _FC_WARN(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_WARN,DeveloperWarning,"",_msg,_file,_line)
|
||||
#define _FC_ERR(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_ERR,DeveloperError,"",_msg,_file,_line)
|
||||
#define _FC_LOG(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_LOG,Log,"",_msg,_file,_line)
|
||||
#define _FC_TRACE(_file,_line,_msg) __FC_PRINT(FC_LOG_INSTANCE,FC_LOGLEVEL_TRACE,Log,"",_msg,_file,_line)
|
||||
|
||||
#define FC_XYZ(_pt) '('<<(_pt).X()<<", " << (_pt).Y()<<", " << (_pt).Z()<<')'
|
||||
#define FC_xy(_pt) '('<<(_pt).x<<", " << (_pt).y<<')'
|
||||
|
||||
@@ -131,7 +131,7 @@ void PyException::ReportException () const
|
||||
{
|
||||
if (!_isReported) {
|
||||
_isReported = true;
|
||||
Base::Console().DeveloperError("%s%s: %s\n",
|
||||
Base::Console().DeveloperError("pyException","%s%s: %s\n",
|
||||
_stackTrace.c_str(), _errorType.c_str(), what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,35 +274,32 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(const Quantity &quant, doub
|
||||
|
||||
// Process into string. Start with negative sign if quantity is less
|
||||
// than zero
|
||||
char plusOrMinus;
|
||||
if( quant.getValue() < 0 )
|
||||
{
|
||||
output << "-";
|
||||
plusOrMinus = '-';
|
||||
}
|
||||
else plusOrMinus = '+';
|
||||
|
||||
bool trailingNumber = false;
|
||||
// Print feet if we have any
|
||||
if( feet!=0 )
|
||||
{
|
||||
output << feet << "'";
|
||||
|
||||
// if there is to be trailing numbers, add space
|
||||
if( inches!=0 || num!=0 )
|
||||
{
|
||||
output << " ";
|
||||
}
|
||||
trailingNumber = true;
|
||||
}
|
||||
|
||||
// Three cases:
|
||||
// 1. Whole inches, no fraction
|
||||
// 2. Whole inches, fraction
|
||||
// 3. Fraction only
|
||||
if( inches>0 && num==0 ) // case 1.
|
||||
// Print whole inches if we have any
|
||||
if( inches!=0 )
|
||||
{
|
||||
if (trailingNumber) output << " ";
|
||||
output << inches << "\"";
|
||||
trailingNumber = true;
|
||||
}
|
||||
else if( inches>0 && num!=0 ) // case 2
|
||||
{
|
||||
output << inches << "+" << num << "/" << den << "\"";
|
||||
}
|
||||
else if( inches==0 && num!=0 ) // case 3
|
||||
// Print fractional inches if we have any
|
||||
if( num!=0 )
|
||||
{
|
||||
if (trailingNumber) output << " " << plusOrMinus << " ";
|
||||
output << num << "/" << den << "\"";
|
||||
}
|
||||
|
||||
|
||||
@@ -262,10 +262,10 @@ void cmdAppDocumentArgs(const App::Document* doc, const std::string& cmd, Args&&
|
||||
doc->getName(), _cmd.c_str());
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
Base::Console().Error("%s: %s\n", e.what(), cmd.c_str());
|
||||
Base::Console().DeveloperError(doc->Label.getStrValue(),"%s: %s\n", e.what(), cmd.c_str());
|
||||
}
|
||||
catch (const Base::Exception&) {
|
||||
Base::Console().Error("App.getDocument('%s').%s\n",
|
||||
Base::Console().DeveloperError(doc->Label.getStrValue(),"App.getDocument('%s').%s\n",
|
||||
doc->getName(), _cmd.c_str());
|
||||
throw;
|
||||
}
|
||||
@@ -385,10 +385,10 @@ void cmdAppObjectArgs(const App::DocumentObject* obj, const std::string& cmd, Ar
|
||||
obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str());
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
Base::Console().Error("%s: %s\n", e.what(), cmd.c_str());
|
||||
Base::Console().DeveloperError(obj->getFullLabel(),"%s: %s\n", e.what(), cmd.c_str());
|
||||
}
|
||||
catch (const Base::Exception&) {
|
||||
Base::Console().Error("App.getDocument('%s').getObject('%s').%s\n",
|
||||
Base::Console().DeveloperError(obj->getFullLabel(),"App.getDocument('%s').getObject('%s').%s\n",
|
||||
obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str());
|
||||
throw;
|
||||
}
|
||||
@@ -410,10 +410,10 @@ void cmdGuiObjectArgs(const App::DocumentObject* obj, const std::string& cmd, Ar
|
||||
obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str());
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
Base::Console().Error("%s: %s\n", e.what(), cmd.c_str());
|
||||
Base::Console().DeveloperError(obj->getFullLabel(),"%s: %s\n", e.what(), cmd.c_str());
|
||||
}
|
||||
catch (const Base::Exception&) {
|
||||
Base::Console().Error("Gui.getDocument('%s').getObject('%s').%s\n",
|
||||
Base::Console().DeveloperError(obj->getFullLabel(),"Gui.getDocument('%s').getObject('%s').%s\n",
|
||||
obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str());
|
||||
throw;
|
||||
}
|
||||
@@ -443,10 +443,10 @@ void doCommandT(Gui::Command::DoCmd_Type cmdType, const std::string& cmd, Args&&
|
||||
Gui::Command::doCommand(cmdType,"%s", _cmd.c_str());
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
Base::Console().Error("%s: %s\n", e.what(), cmd.c_str());
|
||||
Base::Console().DeveloperError("doCommandT","%s: %s\n", e.what(), cmd.c_str());
|
||||
}
|
||||
catch (const Base::Exception&) {
|
||||
Base::Console().Error("%s\n", _cmd.c_str());
|
||||
Base::Console().DeveloperError("doCommandT","%s\n", _cmd.c_str());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -622,7 +622,10 @@ void NavigationStyle::reorientCamera(SoCamera * cam, const SbRotation & rot)
|
||||
|
||||
// Set new orientation value by accumulating the new rotation.
|
||||
cam->orientation = rot * cam->orientation.getValue();
|
||||
|
||||
// Fix issue with near clipping in orthogonal view
|
||||
if (cam->getTypeId().isDerivedFrom(SoOrthographicCamera::getClassTypeId())) {
|
||||
cam->focalDistance = static_cast<SoOrthographicCamera*>(cam)->height;
|
||||
}
|
||||
// Reposition camera so we are still pointing at the same old focal point.
|
||||
cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction);
|
||||
cam->position = focalpoint - cam->focalDistance.getValue() * direction;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="11141375"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="2852126975"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1442775295"/>
|
||||
<FCUInt Name="DefaultExtentsColor" Value="3823363071"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4294903295"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4286382335"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="3372220415"/>
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="11141375"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="2852126975"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1442775295"/>
|
||||
<FCUInt Name="DefaultExtentsColor" Value="3823363071"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4294903295"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4286382335"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="3372220415"/>
|
||||
|
||||
@@ -157,9 +157,9 @@
|
||||
<height>589</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Text</string>
|
||||
</property>
|
||||
@@ -216,7 +216,7 @@
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="toolTip">
|
||||
<string>The line spacing (relative to the font size)</string>
|
||||
<string>The line spacing for multi-line texts and labels (relative to the font size)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Line spacing</string>
|
||||
@@ -226,12 +226,12 @@
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="LineSpacing">
|
||||
<property name="toolTip">
|
||||
<string>The line spacing (relative to the font size)</string>
|
||||
<string>The line spacing for multi-line texts and labels (relative to the font size)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="toolTip">
|
||||
<string>The color of texts, dimension texts and label texts</string>
|
||||
</property>
|
||||
@@ -251,96 +251,13 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Units</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="toolTip">
|
||||
<string>A multiplier factor that affects the size of texts and markers</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale multiplier</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
|
||||
<property name="toolTip">
|
||||
<string>A multiplier factor that affects the size of texts and markers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="toolTip">
|
||||
<string>If it is checked it will show the unit next to the dimension value</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show unit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="ShowUnit">
|
||||
<property name="toolTip">
|
||||
<string>If it is checked it will show the unit next to the dimension value</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="toolTip">
|
||||
<string>Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unit override</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="UnitOverride">
|
||||
<property name="toolTip">
|
||||
<string>Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="toolTip">
|
||||
<string>The number of decimals to show for dimension values</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Decimals</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="Decimals">
|
||||
<property name="toolTip">
|
||||
<string>The number of decimals to show for dimension values</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Lines and arrows</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="toolTip">
|
||||
<string>If it is checked it will display the dimension line</string>
|
||||
</property>
|
||||
@@ -366,7 +283,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="toolTip">
|
||||
<string>The width of the lines</string>
|
||||
</property>
|
||||
@@ -386,7 +303,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="toolTip">
|
||||
<string>The type of arrows or markers to use for dimensions and labels</string>
|
||||
</property>
|
||||
@@ -460,7 +377,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="toolTip">
|
||||
<string>The color of lines and arrows</string>
|
||||
</property>
|
||||
@@ -476,8 +393,100 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Units</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="toolTip">
|
||||
<string>A multiplier factor that affects the size of texts and markers</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale multiplier</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
|
||||
<property name="toolTip">
|
||||
<string>A multiplier factor that affects the size of texts and markers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="toolTip">
|
||||
<string>If it is checked it will show the unit next to the dimension value</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show unit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="ShowUnit">
|
||||
<property name="toolTip">
|
||||
<string>If it is checked it will show the unit next to the dimension value</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="toolTip">
|
||||
<string>Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unit override</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="UnitOverride">
|
||||
<property name="toolTip">
|
||||
<string>Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="toolTip">
|
||||
<string>The number of decimals to show for dimension values</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Decimals</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="Decimals">
|
||||
<property name="toolTip">
|
||||
<string>The number of decimals to show for dimension values</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="title">
|
||||
<string>Dimension details</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="toolTip">
|
||||
<string>The distance the dimension line is additionally extended</string>
|
||||
</property>
|
||||
@@ -486,7 +495,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::InputField" name="DimOvershoot">
|
||||
<property name="toolTip">
|
||||
<string>The distance the dimension line is additionally extended</string>
|
||||
@@ -496,8 +505,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="toolTip">
|
||||
<string>The length of the extension lines</string>
|
||||
</property>
|
||||
@@ -506,7 +515,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::InputField" name="ExtLines">
|
||||
<property name="toolTip">
|
||||
<string>The length of the extension lines</string>
|
||||
@@ -516,8 +525,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="toolTip">
|
||||
<string>The distance the extension lines are additionally extended beyond the dimension line</string>
|
||||
</property>
|
||||
@@ -526,7 +535,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::InputField" name="ExtOvershoot">
|
||||
<property name="toolTip">
|
||||
<string>The distance the extension lines are additionally extended beyond the dimension line</string>
|
||||
@@ -536,6 +545,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="toolTip">
|
||||
<string>The distance between the dimension text and the dimension line</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Text spacing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::InputField" name="TextSpacing">
|
||||
<property name="toolTip">
|
||||
<string>The distance between the dimension text and the dimension line</string>
|
||||
</property>
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -60,22 +60,23 @@ param_draft = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
|
||||
param_view = App.ParamGet("User parameter:BaseApp/Preferences/View")
|
||||
|
||||
ANNOTATION_STYLE = {
|
||||
"FontName": ("font", param_draft.GetString("textfont", "Sans")),
|
||||
"FontSize": ("float", param_draft.GetFloat("textheight", 100)),
|
||||
"LineSpacing": ("float", param_draft.GetFloat("LineSpacing", 1)),
|
||||
"TextColor": ("color", param_draft.GetUnsigned("DefaultTextColor", 255)),
|
||||
"ScaleMultiplier": ("float", 1),
|
||||
"ShowUnit": ("bool", param_draft.GetBool("showUnit", True)),
|
||||
"UnitOverride": ("str", param_draft.GetString("overrideUnit", "")),
|
||||
"Decimals": ("int", param_draft.GetInt("dimPrecision", 2)),
|
||||
"ShowLine": ("bool", True),
|
||||
"LineWidth": ("int", param_view.GetInt("DefaultShapeLineWidth", 1)),
|
||||
"ArrowType": ("index", param_draft.GetInt("dimsymbol", 0)),
|
||||
"ArrowSize": ("float", param_draft.GetFloat("arrowsize", 20)),
|
||||
"LineColor": ("color", param_view.GetUnsigned("DefaultShapeLineColor", 255)),
|
||||
"ArrowType": ("index", param_draft.GetInt("dimsymbol", 0)),
|
||||
"Decimals": ("int", param_draft.GetInt("dimPrecision", 2)),
|
||||
"DimOvershoot": ("float", param_draft.GetFloat("dimovershoot", 20)),
|
||||
"ExtLines": ("float", param_draft.GetFloat("extlines", 300)),
|
||||
"ExtOvershoot": ("float", param_draft.GetFloat("extovershoot", 20)),
|
||||
"FontName": ("font", param_draft.GetString("textfont", "Sans")),
|
||||
"FontSize": ("float", param_draft.GetFloat("textheight", 100)),
|
||||
"LineColor": ("color", param_view.GetUnsigned("DefaultShapeLineColor", 255)),
|
||||
"LineSpacing": ("float", param_draft.GetFloat("LineSpacing", 1)),
|
||||
"LineWidth": ("int", param_view.GetInt("DefaultShapeLineWidth", 1)),
|
||||
"ScaleMultiplier": ("float", 1),
|
||||
"ShowLine": ("bool", True),
|
||||
"ShowUnit": ("bool", param_draft.GetBool("showUnit", True)),
|
||||
"TextColor": ("color", param_draft.GetUnsigned("DefaultTextColor", 255)),
|
||||
"TextSpacing": ("float", param_draft.GetFloat("dimspacing", 20)),
|
||||
"UnitOverride": ("str", param_draft.GetString("overrideUnit", "")),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,23 @@ using namespace Attacher;
|
||||
|
||||
namespace PartDesignGui {
|
||||
|
||||
// TODO: Refactor DocumentObjectItem::getSubName() that has similar logic
|
||||
App::DocumentObject* getParent(App::DocumentObject* obj, std::string& subname)
|
||||
{
|
||||
auto inlist = obj->getInList();
|
||||
for (auto it : inlist) {
|
||||
if (it->hasExtension(App::GeoFeatureGroupExtension::getExtensionClassTypeId())) {
|
||||
std::string parent;
|
||||
parent += obj->getNameInDocument();
|
||||
parent += '.';
|
||||
subname = parent + subname;
|
||||
return getParent(it, subname);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
bool setEdit(App::DocumentObject *obj, PartDesign::Body *body) {
|
||||
if (!obj || !obj->getNameInDocument()) {
|
||||
FC_ERR("invalid object");
|
||||
@@ -76,9 +93,9 @@ bool setEdit(App::DocumentObject *obj, PartDesign::Body *body) {
|
||||
if (activeBody != body) {
|
||||
parent = obj;
|
||||
subname.clear();
|
||||
} else {
|
||||
subname += obj->getNameInDocument();
|
||||
subname += '.';
|
||||
}
|
||||
else {
|
||||
parent = getParent(obj, subname);
|
||||
}
|
||||
|
||||
Gui::cmdGuiDocument(parent, std::ostringstream() << "setEdit("
|
||||
|
||||
@@ -56,7 +56,6 @@ void DlgSettingsPathColor::saveSettings()
|
||||
ui->DefaultRapidPathColor->onSave();
|
||||
ui->DefaultPathLineWidth->onSave();
|
||||
ui->DefaultPathMarkerColor->onSave();
|
||||
ui->DefaultExtentsColor->onSave();
|
||||
ui->DefaultProbePathColor->onSave();
|
||||
ui->DefaultHighlightPathColor->onSave();
|
||||
ui->DefaultBBoxSelectionColor->onSave();
|
||||
@@ -72,7 +71,6 @@ void DlgSettingsPathColor::loadSettings()
|
||||
ui->DefaultRapidPathColor->onRestore();
|
||||
ui->DefaultPathLineWidth->onRestore();
|
||||
ui->DefaultPathMarkerColor->onRestore();
|
||||
ui->DefaultExtentsColor->onRestore();
|
||||
ui->DefaultProbePathColor->onRestore();
|
||||
ui->DefaultHighlightPathColor->onRestore();
|
||||
ui->DefaultBBoxSelectionColor->onRestore();
|
||||
|
||||
@@ -23,6 +23,41 @@
|
||||
<string>Default Path colors</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="DefaultPathLineWidth">
|
||||
<property name="toolTip">
|
||||
<string>The default line thickness for new shapes</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultPathLineWidth</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Path highlight color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
@@ -36,6 +71,39 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultBBoxNormalColor">
|
||||
<property name="toolTip">
|
||||
<string>The default line color for new shapes</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultBBoxNormalColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounding box normal color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultNormalPathColor">
|
||||
<property name="toolTip">
|
||||
@@ -56,8 +124,28 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultRapidPathColor">
|
||||
<property name="toolTip">
|
||||
<string>The default line color for new shapes</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>170</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultRapidPathColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
@@ -65,32 +153,56 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default pathline width</string>
|
||||
<string>Probe path color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="DefaultPathLineWidth">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rapid path color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultHighlightPathColor">
|
||||
<property name="toolTip">
|
||||
<string>The default line thickness for new shapes</string>
|
||||
<string>The default line color for new shapes</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>125</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultPathLineWidth</cstring>
|
||||
<cstring>DefaultHighlightPathColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounding box selection color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="minimumSize">
|
||||
@@ -124,8 +236,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
@@ -133,40 +245,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rapid path color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultRapidPathColor">
|
||||
<property name="toolTip">
|
||||
<string>The default line color for new shapes</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>170</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultRapidPathColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Probe Path color</string>
|
||||
<string>Default pathline width</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -190,103 +269,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Machine extents color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultExtentsColor">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultExtentsColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Path Highlight Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultHighlightPathColor">
|
||||
<property name="toolTip">
|
||||
<string>The default line color for new shapes</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>125</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultHighlightPathColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounding Box Normal Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultBBoxNormalColor">
|
||||
<property name="toolTip">
|
||||
<string>The default line color for new shapes</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultBBoxNormalColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Path</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounding Box Selection Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="DefaultBBoxSelectionColor">
|
||||
<property name="toolTip">
|
||||
<string>The default line color for new shapes</string>
|
||||
@@ -307,39 +290,8 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>label_6</zorder>
|
||||
<zorder>DefaultNormalPathColor</zorder>
|
||||
<zorder>label_9</zorder>
|
||||
<zorder>DefaultPathLineWidth</zorder>
|
||||
<zorder>label_10</zorder>
|
||||
<zorder>DefaultPathMarkerColor</zorder>
|
||||
<zorder>label_7</zorder>
|
||||
<zorder>DefaultRapidPathColor</zorder>
|
||||
<zorder>label</zorder>
|
||||
<zorder>DefaultExtentsColor</zorder>
|
||||
<zorder>label_8</zorder>
|
||||
<zorder>DefaultProbePathColor</zorder>
|
||||
<zorder>label_11</zorder>
|
||||
<zorder>DefaultHighlightPathColor</zorder>
|
||||
<zorder>label_13</zorder>
|
||||
<zorder>DefaultBBoxNormalColor</zorder>
|
||||
<zorder>label_14</zorder>
|
||||
<zorder>DefaultBBoxSelectionColor</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>7</width>
|
||||
<height>220</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="sizePolicy">
|
||||
@@ -449,6 +401,19 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>7</width>
|
||||
<height>220</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="extendCorners">
|
||||
<property name="toolTip">
|
||||
<string>Extend the corner between two edges of a pocket. If selected adjacent edges are combined</string>
|
||||
<string>Extend the corner between two edges of a pocket. Selected adjacent edges are combined.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Extend Corners</string>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<widget class="QLineEdit" name="postProcessorOutputFile">
|
||||
<property name="toolTip">
|
||||
<string>Enter a path and optionally file name (see below) to be used as the default for the post processor export.
|
||||
The following substitutions are performed before the name is resolved at the time of the post-processing:
|
||||
The following substitutions are performed before the name is resolved at the time of the post processing:
|
||||
Substitution allows the following:
|
||||
%D ... directory of the active document
|
||||
%d ... name of the active document (with extension)
|
||||
@@ -397,7 +397,7 @@ FreeCAD has no knowledge of where a particular coordinate system exists within t
|
||||
<string>If multiple coordinate systems are in use, setting this to TRUE will cause the gcode to be written to multiple output files as controlled by the 'order by' property. For example, if ordering by Fixture, the first output file will be for the first fixture and separate file for the second.</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string><html><head/><body><p>If True, post-processing will create multiple output files based on the <span style=" font-style:italic;">order by</span> setting.
|
||||
<string><html><head/><body><p>If True, post processing will create multiple output files based on the <span style=" font-style:italic;">order by</span> setting.
|
||||
|
||||
|
||||
For example, if <span style=" font-style:italic;">order by</span> is set to Tool, the first output file will contain the first tool change and all operations, in all coordinate systems, that can be done with that tool before the next tool change is called.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>512</width>
|
||||
<width>487</width>
|
||||
<height>691</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -64,7 +64,7 @@
|
||||
<string>Suppress warning whenever a Path selection mode is activated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Suppress Velocity warning</string>
|
||||
<string>Suppress feed rate warning</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
@@ -102,43 +102,23 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Open CAMlib</string>
|
||||
<string>OpenCAMLib</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>If OpenCAMLib is installed with Python bindings it can be used by some additional 3D operations. NOTE: Enabling OpenCAMLib here requires a restart of FreeCAD to take effect.</string>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:12pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:16pt;">If openCAMlib is installed with its python interface it can be used by some additional 3d operations.</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:16pt;">Changing this value requires a restart of FreeCAD to take effect.</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -185,8 +185,8 @@ If left empty no template will be preselected.</string>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="leOutputFile">
|
||||
<property name="toolTip">
|
||||
<string>Enter a path and optionally file name (see below) to be used as the default for the post-processor export.
|
||||
The following substitutions are performed before the name is resolved at the time of the post-processing:
|
||||
<string>Enter a path and optionally file name (see below) to be used as the default for the post processor export.
|
||||
The following substitutions are performed before the name is resolved at the time of the post processing:
|
||||
Substitution allows the following:
|
||||
%D ... directory of the active document
|
||||
%d ... name of the active document (with extension)
|
||||
|
||||
@@ -140,7 +140,7 @@ class GCodeEditorDialog(QtGui.QDialog):
|
||||
lab.setText(
|
||||
translate(
|
||||
"Path_Inspect",
|
||||
"<b>Note</b>: This dialog shows Path Commands in FreeCAD base units (mm/s). \n Values will be converted to the desired unit during post-processing.",
|
||||
"<b>Note</b>: This dialog shows Path Commands in FreeCAD base units (mm/s). \n Values will be converted to the desired unit during post processing.",
|
||||
)
|
||||
)
|
||||
lab.setWordWrap(True)
|
||||
|
||||
@@ -133,14 +133,14 @@ class ObjectJob:
|
||||
"App::PropertyString",
|
||||
"LastPostProcessDate",
|
||||
"Output",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Last Time the Job was post-processed"),
|
||||
QT_TRANSLATE_NOOP("App::Property", "Last Time the Job was post processed"),
|
||||
)
|
||||
obj.setEditorMode("LastPostProcessDate", 2) # Hide
|
||||
obj.addProperty(
|
||||
"App::PropertyString",
|
||||
"LastPostProcessOutput",
|
||||
"Output",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Last Time the Job was post-processed"),
|
||||
QT_TRANSLATE_NOOP("App::Property", "Last Time the Job was post processed"),
|
||||
)
|
||||
obj.setEditorMode("LastPostProcessOutput", 2) # Hide
|
||||
|
||||
|
||||
Reference in New Issue
Block a user