Fix typos and some trailing whitespace
Found via: ``` codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml ```
This commit is contained in:
@@ -362,7 +362,7 @@ def render(outputfile,scene=None,camera=None,zoom=False,width=400,height=300,bac
|
||||
def buildScene(objects,colors=None):
|
||||
|
||||
"""buildScene(objects,colors=None): builds a coin node from a given list of FreeCAD
|
||||
objects. Optional colors argument can be a dicionary of objName:ShapeColorTuple
|
||||
objects. Optional colors argument can be a dictionary of objName:ShapeColorTuple
|
||||
or obj:DiffuseColorList pairs."""
|
||||
|
||||
from pivy import coin
|
||||
|
||||
@@ -433,7 +433,7 @@ def buildRelProperties(ifcfile):
|
||||
|
||||
|
||||
def getIfcPropertySets(ifcfile, pid):
|
||||
"""Returns a dicionary of {pset_id:[prop_id, prop_id...]} for an IFC object"""
|
||||
"""Returns a dictionary of {pset_id:[prop_id, prop_id...]} for an IFC object"""
|
||||
|
||||
# get psets for this pid
|
||||
psets = {}
|
||||
|
||||
@@ -462,7 +462,7 @@ class DraftCreation(unittest.TestCase):
|
||||
"""Create a linear dimension."""
|
||||
operation = "Draft Dimension"
|
||||
_msg(" Test '{}'".format(operation))
|
||||
_msg(" Occasionaly crashes")
|
||||
_msg(" Occasionally crashes")
|
||||
a = Vector(0, 0, 0)
|
||||
b = Vector(9, 0, 0)
|
||||
c = Vector(4, -1, 0)
|
||||
@@ -577,7 +577,7 @@ class DraftCreation(unittest.TestCase):
|
||||
"""Create a label."""
|
||||
operation = "Draft Label"
|
||||
_msg(" Test '{}'".format(operation))
|
||||
_msg(" Occasionaly crashes")
|
||||
_msg(" Occasionally crashes")
|
||||
target_point = Vector(0, 0, 0)
|
||||
distance = -25
|
||||
placement = App.Placement(Vector(50, 50, 0), App.Rotation())
|
||||
|
||||
@@ -34,7 +34,7 @@ class TestFemImport(unittest.TestCase):
|
||||
|
||||
# ********************************************************************************************
|
||||
# no is document needed to test import Fem and import FemGui
|
||||
# thus neiter setUp nor tearDown methods are needed
|
||||
# thus neither setUp nor tearDown methods are needed
|
||||
|
||||
def test_00print(
|
||||
self
|
||||
|
||||
@@ -285,7 +285,7 @@ bool Tessellation::accept()
|
||||
// TODO: currently, we can only retrieve part feature
|
||||
// color. The problem is that if the feature is linked,
|
||||
// there are potentially many places where the color can
|
||||
// get overriden.
|
||||
// get overridden.
|
||||
//
|
||||
// With topo naming feature merged, it will be possible to
|
||||
// infer more accurate colors from just the shape names,
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
/** Pocket parameters
|
||||
*
|
||||
* These parameters cooresponds to CAreaPocketParams in libarea
|
||||
* These parameters corresponds to CAreaPocketParams in libarea
|
||||
* */
|
||||
#define AREA_PARAMS_POCKET \
|
||||
((enum,mode,PocketMode,0,"Selects the pocket toolpath pattern",\
|
||||
|
||||
@@ -27,15 +27,15 @@
|
||||
* \ingroup PATH
|
||||
* Collections of macros for managing groups of parameters.
|
||||
*
|
||||
* \section Motivation
|
||||
* \section Motivation
|
||||
*
|
||||
* For an application like FreeCAD, there are often cases where the same set of
|
||||
* parameters are referred in dozons of different places. The macros here is
|
||||
* designed to help managing those parameters, so that you can define groups of
|
||||
* parameters once, and refer them everywhere in groups with simple macro calls for
|
||||
* all kinds of purposes. Any changing, adding and removing of parameters in the
|
||||
* group become much easier. And by everywhere, I mean \ref ParamCommon
|
||||
* "class definition, impelentation", \ref ParamProperty "document object properties",
|
||||
* group become much easier. And by everywhere, I mean \ref ParamCommon
|
||||
* "class definition, implementation", \ref ParamProperty "document object properties",
|
||||
* \ref ParamPy "python c++ classes", and even \ref ParamDoc "doc string",
|
||||
* pretty much everything except the python code, which although not implemented
|
||||
* yet, is in fact also possible to be done using C preprocessor (No one says C
|
||||
@@ -49,7 +49,7 @@
|
||||
* goes wrong, the compiler error message is kind of cryptic. If so, first
|
||||
* double check your macro definition of the parameter is correctly, not missing
|
||||
* or having extra parathesis or comma. Then, you can use the CMake
|
||||
* intermeidate file target to get the preprocessor output for checking. For
|
||||
* intermediate file target to get the preprocessor output for checking. For
|
||||
* example, for a file located at \c src/Mod/Path/App/Area.cpp,
|
||||
* \code{.sh}
|
||||
* cd <your_build_dir>/src/Mod/Path/App
|
||||
@@ -65,7 +65,7 @@
|
||||
*
|
||||
* The macros here make heavy use of the awsome
|
||||
* [Boost.Preprocessor](http://www.boost.org/libs/preprocessor/) (short for
|
||||
* Boost.PP). Here are some brief introduction on Boost.PP conecept in order to
|
||||
* Boost.PP). Here are is a brief introduction on Boost.PP concept in order to
|
||||
* explain why this marco library is designed the way it is.
|
||||
*
|
||||
* In Boost.PP, a sequence is defined as,
|
||||
@@ -145,13 +145,13 @@
|
||||
* Area.h, Area.cpp, FeatureArea.h, FeatureArea.cpp for usage of variouse macros.
|
||||
*
|
||||
* See struct AreaDoc for an example of doc string generation.
|
||||
*
|
||||
* Each field of the parameter can be referred to with various
|
||||
* \ref ParamAccessor "various accessor macros", and can be easily
|
||||
*
|
||||
* Each field of the parameter can be referred to with various
|
||||
* \ref ParamAccessor "various accessor macros", and can be easily
|
||||
* \ref ParamStringizer "stringified".
|
||||
*
|
||||
* \anchor ParamField You can also use #PARAM_FIELD(_field,_param) to refer to
|
||||
* each field, where \a _field is one of <tt>TYPE, ARG, NAME, DEF, DOC, or SEQ</tt>.
|
||||
* each field, where \a _field is one of <tt>TYPE, ARG, NAME, DEF, DOC, or SEQ</tt>.
|
||||
* And #PARAM_FIELD_STR to stringify.
|
||||
*
|
||||
* Here \a _param is the parameter definition described above in the form of a
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
/**
|
||||
* \defgroup ParamAccessor Field accessors
|
||||
* To abstract parameter field details
|
||||
* To abstract parameter field details
|
||||
* \ingroup ParamHelper
|
||||
* @{
|
||||
*/
|
||||
@@ -229,7 +229,7 @@
|
||||
#define PARAM_FSEQ_STR_(_i,_elem) \
|
||||
BOOST_PP_COMMA_IF(_i) BOOST_PP_STRINGIZE(_elem)
|
||||
|
||||
/** \c SEQ stringizer will stringify each element separately
|
||||
/** \c SEQ stringizer will stringify each element separately
|
||||
*
|
||||
* Expands to:
|
||||
* #seq[0], #seq[1] ...
|
||||
@@ -261,7 +261,7 @@
|
||||
/** Helper for #PARAM_FOREACH_I */
|
||||
#define PARAM_FOREACH_I_(_,_op,_i,_param) _op(_i,_param)
|
||||
|
||||
/** Apply macro \a _op to each parameter in sequence \a _seq with additional index
|
||||
/** Apply macro \a _op to each parameter in sequence \a _seq with additional index
|
||||
*
|
||||
* Operation macro \a _op should be defined as,
|
||||
* \code
|
||||
@@ -277,9 +277,9 @@
|
||||
#define PARAM_TYPED_FOREACH_(_1,_op,_param) \
|
||||
PARAM_TYPED(_op,_param)(_param)
|
||||
|
||||
/** Type depended macro construction
|
||||
/** Type depended macro construction
|
||||
*
|
||||
* Convert macro \a _op to \a _op##\<type\>. Note that it only converts the
|
||||
* Convert macro \a _op to \a _op##\<type\>. Note that it only converts the
|
||||
* macro name, not contsucts a macro call. To expand to a macro call, simply
|
||||
* \code
|
||||
* PARAM_TYPED(_op,_param)(_param)
|
||||
@@ -289,7 +289,7 @@
|
||||
#define PARAM_TYPED(_op,_param) \
|
||||
BOOST_PP_CAT(_op,PARAM_FTYPE(_param))
|
||||
|
||||
/** Apply type dependent macro call to a sequence of parameters
|
||||
/** Apply type dependent macro call to a sequence of parameters
|
||||
*
|
||||
* \a _op will be converted to \a _op##\<type\> for each parameter
|
||||
* \ingroup ParamLooper
|
||||
@@ -298,7 +298,7 @@
|
||||
BOOST_PP_SEQ_FOR_EACH(PARAM_TYPED_FOREACH_,_op,_seq)
|
||||
|
||||
|
||||
/** \defgroup ParamCommon Common helpers
|
||||
/** \defgroup ParamCommon Common helpers
|
||||
* \ingroup ParamHelper
|
||||
*/
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
|
||||
/** Obtain parameter type
|
||||
*
|
||||
* The main purpose is to alias enum type to short
|
||||
* The main purpose is to alias enum type to short
|
||||
* \ingroup ParamCommon
|
||||
*/
|
||||
#define PARAM_TYPE(_param) \
|
||||
@@ -334,17 +334,17 @@
|
||||
* #define MY_SRC(_param) BOOST_PP_CAT(my,PARAM_FNAME(_param))
|
||||
* ->
|
||||
* my##<name>
|
||||
* \endcode
|
||||
* \endcode
|
||||
*
|
||||
* Expands to:
|
||||
* \code{.unparsed}
|
||||
* type1 _src(_param1);type2 _src(_param2); ...
|
||||
* \endcode
|
||||
* \endcode
|
||||
* \ingroup ParamCommon
|
||||
*/
|
||||
#define PARAM_DECLARE(_src,_seq) \
|
||||
BOOST_PP_SEQ_FOR_EACH(PARAM_DECLARE_,_src,_seq)
|
||||
|
||||
|
||||
|
||||
/** Helper for #PARAM_DECLARE_INIT */
|
||||
#define PARAM_DECLARE_INIT_(_1,_src,_param) \
|
||||
@@ -360,7 +360,7 @@
|
||||
* Expands to:
|
||||
* \code{.unparsed}
|
||||
* type1 _src(_param1)=_def1;type2 _src(_param2)=_def2; ...
|
||||
* \endcode
|
||||
* \endcode
|
||||
* \ingroup ParamCommon
|
||||
*/
|
||||
#define PARAM_DECLARE_INIT(_src,_seq) \
|
||||
@@ -379,7 +379,7 @@
|
||||
#define PARAM_ENUM_DECLARE_bool(_param)
|
||||
#define PARAM_ENUM_DECLARE_enum2 PARAM_ENUM_DECLARE_enum
|
||||
|
||||
/** \defgroup ParamEnumHelper Enum convert helpers
|
||||
/** \defgroup ParamEnumHelper Enum convert helpers
|
||||
* \ingroup ParamCommon
|
||||
*/
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
BOOST_PP_TUPLE_ELEM(2,_args),\
|
||||
_param)
|
||||
|
||||
/** Convert single enum parameter value into user defined enum type
|
||||
/** Convert single enum parameter value into user defined enum type
|
||||
*
|
||||
* This macro is used by #PARAM_ENUM_CONVERT to convert each parameter, but
|
||||
* you can use it directly for a single parameter. Check #PARAM_NUM_CONVERT
|
||||
@@ -449,7 +449,7 @@
|
||||
*
|
||||
* This assumes the user defined enum type is given in \ref ParamSeq "seq_type"
|
||||
* of the parameter definition, and it has the same postfix as the ones
|
||||
* specified in \ref ParamSeq "seq" member of the parameter definition. See
|
||||
* specified in \ref ParamSeq "seq" member of the parameter definition. See
|
||||
* \ref ParamEnumHelper "here" for implementations
|
||||
*
|
||||
* \ingroup ParamEnumHelper
|
||||
@@ -460,7 +460,7 @@
|
||||
* access the field. Or, supply your own macro to append any prefix as you
|
||||
* like.
|
||||
* \arg \c _dst: Same as above.
|
||||
* \arg \c _default: A macro to call for invalid value. Signature should be
|
||||
* \arg \c _default: A macro to call for invalid value. Signature should be
|
||||
* <tt>_default(_param)<\tt>, where \c _param is the parameter definition. You
|
||||
* can use #PARAM_ENUM_EXCEPT to throw Base::ValueError exception in FreeCAD
|
||||
* \arg \c _seq: Parameter sequence
|
||||
@@ -481,7 +481,7 @@
|
||||
*
|
||||
* expands to
|
||||
* \code{.unparsed}
|
||||
* MyEnum1 myTest1;
|
||||
* MyEnum1 myTest1;
|
||||
* switch(Test1) {
|
||||
* case Test1Foo:
|
||||
* myTest1 = myEnum1Foo;
|
||||
@@ -492,7 +492,7 @@
|
||||
* default:
|
||||
* throw Base::ValueError("invalid value for enum Test1");
|
||||
* }
|
||||
* MyEnum2 myTest2;
|
||||
* MyEnum2 myTest2;
|
||||
* switch(Test2) {
|
||||
* case Test1Foo:
|
||||
* myTest2 = myEnum2Foo;
|
||||
@@ -537,7 +537,7 @@
|
||||
|
||||
/* Validate enum type parameters
|
||||
*
|
||||
* This macro validates the value a variable of enum type parameters. See
|
||||
* This macro validates the value a variable of enum type parameters. See
|
||||
* similar macro #PARAM_ENUM_CONVERT for detail usage.
|
||||
*
|
||||
* \ingroup ParamEnumHelper
|
||||
@@ -548,7 +548,7 @@
|
||||
* access the field. Or, supply your own macro to append any prefix as you
|
||||
* like.
|
||||
*
|
||||
* \arg \c _default: A macro to call for invalid value. Signature should be
|
||||
* \arg \c _default: A macro to call for invalid value. Signature should be
|
||||
* <tt>_default(_param)<\tt>, where \c _param is the parameter definition. You
|
||||
* can use #PARAM_ENUM_EXCEPT to throw Base::ValueError exception in FreeCAD
|
||||
*
|
||||
@@ -581,7 +581,7 @@
|
||||
* ...
|
||||
* \endcode
|
||||
* Example usage:
|
||||
* PARAM_ENUM_STRING_DECLARE(static const char *Enum, MyParamsSeq)
|
||||
* PARAM_ENUM_STRING_DECLARE(static const char *Enum, MyParamsSeq)
|
||||
* \ingroup ParamEnumHelper
|
||||
*/
|
||||
#define PARAM_ENUM_STRING_DECLARE(_prefix,_seq) \
|
||||
@@ -599,7 +599,7 @@
|
||||
*
|
||||
* Expand to,
|
||||
* \code{.unparsed}
|
||||
* _src(_param1)(def1), _src(_param1)(def2)...
|
||||
* _src(_param1)(def1), _src(_param1)(def2)...
|
||||
* \endcode
|
||||
* \ingroup ParamCommon
|
||||
*/
|
||||
@@ -656,14 +656,14 @@
|
||||
#define PARAM_ARGS_(_,_src,_i,_param) \
|
||||
BOOST_PP_COMMA_IF(_i) PARAM_TYPE(_param) _src(_param)
|
||||
|
||||
/** Declare the parameters as function argument list without defaults.
|
||||
/** Declare the parameters as function argument list without defaults.
|
||||
*
|
||||
* \arg \c _src: macro to generate source field. See \ref ParamSrc "here" for
|
||||
* more details
|
||||
*
|
||||
* Expand to:
|
||||
* \code{.unparsed}
|
||||
* type1 _src(_param1), type2 _src(_param2) ...
|
||||
* type1 _src(_param1), type2 _src(_param2) ...
|
||||
* \endcode
|
||||
* \ingroup ParamCommon
|
||||
*/
|
||||
@@ -677,7 +677,7 @@
|
||||
*/
|
||||
|
||||
/** \defgroup ParamDoc Python doc helper
|
||||
* Generate argument doc string for Python
|
||||
* Generate argument doc string for Python
|
||||
* \ingroup ParamPy
|
||||
*/
|
||||
|
||||
@@ -703,7 +703,7 @@
|
||||
#define PARAM_PY_DOC_(_,_field,_param) \
|
||||
PARAM_TYPED(PARAM_PY_DOC_,_param)(_field,_param)
|
||||
|
||||
/* Generate document of a sequence of parameters
|
||||
/* Generate document of a sequence of parameters
|
||||
* \ingroup ParamDoc
|
||||
*/
|
||||
#define PARAM_PY_DOC(_field,_seq) \
|
||||
@@ -714,7 +714,7 @@
|
||||
#define PARAM_PY_ARGS_DOC_(_,_field,_i,_param) \
|
||||
BOOST_PP_IF(_i,", "," ") PARAM_FIELD_STR(_field,_param) "=" PARAM_FDEF_STR(_param)
|
||||
|
||||
/** Generate argument list string
|
||||
/** Generate argument list string
|
||||
* \arg \c _field: specifies the \ref ParamField "field" to use as name
|
||||
*
|
||||
* Expand to a single string:
|
||||
@@ -732,7 +732,7 @@
|
||||
#define PARAM_FIELDS_(_1,_src,_i,_param) \
|
||||
BOOST_PP_COMMA_IF(_i) _src(_param)
|
||||
|
||||
/** Expand to a list of the given field in the parameter sequence
|
||||
/** Expand to a list of the given field in the parameter sequence
|
||||
*
|
||||
* \arg \c _src: macro to generate source field. See \ref ParamSrc "here" for
|
||||
* more details
|
||||
@@ -771,7 +771,7 @@
|
||||
* \arg \c _src: macro to generate source field. See \ref ParamSrc "here" for
|
||||
* more details
|
||||
*
|
||||
* The field will be casted from python C to C type
|
||||
* The field will be casted from python C to C type
|
||||
* \ingroup ParamCommon ParamPy
|
||||
*/
|
||||
#define PARAM_PY_FIELDS(_src,_seq) \
|
||||
@@ -800,7 +800,7 @@
|
||||
#define PARAM_PY_KWDS_(_param) \
|
||||
PARAM_TYPED(PARAM_PYARG_,_param)
|
||||
|
||||
/** Generate a format string for kewords based argument
|
||||
/** Generate a format string for kewords based argument
|
||||
* \ingroup ParamPy
|
||||
*/
|
||||
#define PARAM_PY_KWDS(_seq) \
|
||||
@@ -817,7 +817,7 @@
|
||||
#define PARAM_PY_DECLARE_(_1,_src,_param) \
|
||||
PARAM_TYPED(PARAM_PY_TYPE_,_param) _src(_param);
|
||||
|
||||
/** Declare field variables for Python C type without initialization
|
||||
/** Declare field variables for Python C type without initialization
|
||||
* \ingroup ParamPy
|
||||
*/
|
||||
#define PARAM_PY_DECLARE(_src,_seq) \
|
||||
@@ -853,7 +853,7 @@
|
||||
* more details
|
||||
* Expand to:
|
||||
* \code{.unparsed}
|
||||
* &_src(_param1), &_src(_param1) ...
|
||||
* &_src(_param1), &_src(_param1) ...
|
||||
* \endcode
|
||||
* \ingroup ParamPy
|
||||
*/
|
||||
@@ -874,7 +874,7 @@
|
||||
#define PARAM_CAST_PYOBJ_enum2 PARAM_CAST_PYOBJ_short
|
||||
|
||||
|
||||
/** Stringize field to a Python string
|
||||
/** Stringize field to a Python string
|
||||
* \ingroup ParamPy ParamStringizer
|
||||
*/
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
@@ -901,8 +901,8 @@
|
||||
* Roughly translated to:
|
||||
* \code{.unparsed}
|
||||
* PyDict_SetItem(_dict,#_field1,_src(_param));
|
||||
* PyDict_SetItem(_dict,#_field2,_src(_param));
|
||||
* ...
|
||||
* PyDict_SetItem(_dict,#_field2,_src(_param));
|
||||
* ...
|
||||
* \endcode
|
||||
* \ingroup ParamPy
|
||||
*/
|
||||
@@ -951,8 +951,8 @@
|
||||
* Roughly translated to:
|
||||
* \code{.unparsed}
|
||||
* PyDict_SetItem(_dict,#_field1,doc1);
|
||||
* PyDict_SetItem(_dict,#_field1,doc2);
|
||||
* ...
|
||||
* PyDict_SetItem(_dict,#_field1,doc2);
|
||||
* ...
|
||||
* \endcode
|
||||
* \ingroup ParamDoc
|
||||
*/
|
||||
@@ -961,7 +961,7 @@
|
||||
|
||||
|
||||
/** \defgroup ParamProperty Property Macros
|
||||
* Helper macros for FreeCAD properties
|
||||
* Helper macros for FreeCAD properties
|
||||
* \ingroup ParamHelper
|
||||
* @{*/
|
||||
#define PARAM_PROP_bool(_param) App::PropertyBool PARAM_FNAME(_param)
|
||||
@@ -976,7 +976,7 @@
|
||||
#define PARAM_PROP_DECLARE_(_param) \
|
||||
PARAM_TYPED(PARAM_PROP_,_param)(_param);
|
||||
|
||||
/** Declare FreeCAD properties
|
||||
/** Declare FreeCAD properties
|
||||
* \ingroup ParamProperty
|
||||
*/
|
||||
#define PARAM_PROP_DECLARE(_seq) \
|
||||
@@ -1025,7 +1025,7 @@
|
||||
/** Setup \c enum type parameter */
|
||||
#define PARAM_PROP_SET_ENUM_enum(_prefix,_param) \
|
||||
PARAM_FNAME(_param).setEnums(BOOST_PP_CAT(_prefix,PARAM_FNAME(_param)));
|
||||
|
||||
|
||||
/** Helper for #PARAM_PROP_SET_ENUM */
|
||||
#define PARAM_PROP_SET_ENUM_TYPED(_1,_prefix,_param) \
|
||||
PARAM_TYPED(PARAM_PROP_SET_ENUM_,_param)(_prefix,_param)
|
||||
@@ -1041,7 +1041,7 @@
|
||||
#define PARAM_PROP_ARGS_(_i,_param) \
|
||||
BOOST_PP_COMMA_IF(_i) PARAM_FNAME(_param).getValue()
|
||||
|
||||
/** Expand the property list as function arguments
|
||||
/** Expand the property list as function arguments
|
||||
*
|
||||
* Expand to:
|
||||
* \code{.unparsed}
|
||||
@@ -1056,8 +1056,8 @@
|
||||
/** Helper for #PARAM_PROP_TOUCHED */
|
||||
#define PARAM_PROP_TOUCHED_(_param) \
|
||||
if(PARAM_FNAME(_param).isTouched()) return 1;
|
||||
|
||||
/** Returns 1 if any properties is touched
|
||||
|
||||
/** Returns 1 if any properties is touched
|
||||
*
|
||||
* Expand to:
|
||||
* \code{.unparsed}
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>It doesn't seem there are any post processor scripts installed. Pleas add some into your macro directory and make sure the file name ends with &quot;_post.py&quot;.</p></body></html></string>
|
||||
<string><html><head/><body><p>It doesn't seem there are any post processor scripts installed. Please add some into your macro directory and make sure the file name ends with &quot;_post.py&quot;.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -501,7 +501,7 @@ class ObjectDressup:
|
||||
1. Start from the original startpoint of the plunge
|
||||
2. Calculate the distance on the path which is needed to implement the ramp
|
||||
and travel that distance while maintaining start depth
|
||||
3. Start ramping while travelling the original path backwards until reaching the
|
||||
3. Start ramping while traveling the original path backwards until reaching the
|
||||
original plunge end point
|
||||
4. Continue with the original path
|
||||
"""
|
||||
@@ -541,7 +541,7 @@ class ObjectDressup:
|
||||
curPoint = newPoint
|
||||
|
||||
else:
|
||||
# we are travelling on start depth
|
||||
# we are traveling on start depth
|
||||
newPoint = FreeCAD.Base.Vector(redge.valueAt(redge.LastParameter).x, redge.valueAt(redge.LastParameter).y, p0.z)
|
||||
outedges.append(self.createRampEdge(redge, curPoint, newPoint))
|
||||
curPoint = newPoint
|
||||
|
||||
@@ -1262,8 +1262,8 @@ class ObjectSurface(PathOp.ObjectOp):
|
||||
pnt.y = RNG[0].y
|
||||
pnt.z = RNG[0].z + float(obj.DepthOffset.Value)
|
||||
|
||||
# Adjust feed rate based on radius/circumferance of cutter.
|
||||
# Original feed rate based on travel at circumferance.
|
||||
# Adjust feed rate based on radius/circumference of cutter.
|
||||
# Original feed rate based on travel at circumference.
|
||||
if rN > 0:
|
||||
# if pnt.z > self.layerEndPnt.z:
|
||||
if pnt.z >= self.layerEndzMax:
|
||||
|
||||
@@ -223,7 +223,7 @@ def horizontalFaceLoop(obj, face, faceList=None):
|
||||
outline = TechDraw.findShapeOutline(comp, 1, FreeCAD.Vector(0, 0, 1))
|
||||
|
||||
# findShapeOutline always returns closed wires, by removing the
|
||||
# trace-backs single edge spikes don't contriubte to the bound box
|
||||
# trace-backs single edge spikes don't contribute to the bound box
|
||||
uniqueEdges = []
|
||||
for edge in outline.Edges:
|
||||
if any(PathGeom.edgesMatch(edge, e) for e in uniqueEdges):
|
||||
|
||||
@@ -875,7 +875,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
|
||||
|
||||
|
||||
void AddIndex(int vertexNumber, const SpanDataObject* data);
|
||||
bool Split(double MaximumRadius, double reslution); // split arcs larger than MaximumRadius to resoultion
|
||||
bool Split(double MaximumRadius, double reslution); // split arcs larger than MaximumRadius to resolution
|
||||
int IntExtWire( Kurve& kSec, double Ref, double Sec, double height, Kurve* kOut); // interpolate / extrapolate a mid height kurve (wire)
|
||||
void SetZ(double z) { e[11] = z; if(fabs(z) > 1.0e-6) m_unit = false;} // assigns kurve to fixed height (wire)
|
||||
|
||||
|
||||
@@ -838,7 +838,7 @@ public:
|
||||
case TRANSITION_MODE_Perpendicular_L: // 5th mode
|
||||
TransitionMode = TRANSITION_MODE_Perpendicular_R;
|
||||
break;
|
||||
default: // 6th mode (Perpendicular_R) + unexpexted mode
|
||||
default: // 6th mode (Perpendicular_R) + unexpected mode
|
||||
SegmentMode = SEGMENT_MODE_Line;
|
||||
if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId())
|
||||
TransitionMode = TRANSITION_MODE_Tangent;
|
||||
@@ -7014,14 +7014,14 @@ public:
|
||||
EditCurve[16].x,EditCurve[16].y,EditCurve[17].x,EditCurve[17].y, // line1
|
||||
EditCurve[0].x,EditCurve[0].y,EditCurve[34].x,EditCurve[34].y, // line2
|
||||
Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(), // the sketch
|
||||
geometryCreationMode==Construction?"True":"False", // geometry as construction or not
|
||||
geometryCreationMode==Construction?"True":"False", // geometry as construction or not
|
||||
firstCurve,firstCurve+3, // tangent1
|
||||
firstCurve,firstCurve+2, // tangent2
|
||||
firstCurve+2,firstCurve+1, // tangent3
|
||||
firstCurve+3,firstCurve+1, // tangent4
|
||||
(fabs(lx)>fabs(ly))?"Horizontal":"Vertical", firstCurve+2, // vertical or horizontal constraint
|
||||
firstCurve,firstCurve+1, // equal constraint
|
||||
Gui::Command::getObjectCmd(sketchgui->getObject()).c_str()); // the sketch
|
||||
Gui::Command::getObjectCmd(sketchgui->getObject()).c_str()); // the sketch
|
||||
|
||||
Gui::Command::commitCommand();
|
||||
|
||||
|
||||
@@ -83,14 +83,14 @@ hTrimCurve::hTrimCurve(Handle(Geom2d_Curve) hCurveIn,
|
||||
//just a convenient struct for now.
|
||||
}
|
||||
|
||||
//All this occ math is being done on on edges(&vertices) that have been through the center/scale/mirror process.
|
||||
//All this OCC math is being done on on edges(&vertices) that have been through the center/scale/mirror process.
|
||||
|
||||
//TODO: this needs to be exposed to Python
|
||||
void DrawDimHelper::makeExtentDim(DrawViewPart* dvp,
|
||||
std::vector<std::string> edgeNames,
|
||||
int direction)
|
||||
{
|
||||
// Base::Console().Message("DDH::makeExtentDim() - dvp: %s edgeNames: %d\n",
|
||||
// Base::Console().Message("DDH::makeExtentDim() - dvp: %s edgeNames: %d\n",
|
||||
// dvp->Label.getValue(), edgeNames.size());
|
||||
if (dvp == nullptr) {
|
||||
// Base::Console().Message("DDH::makeExtentDim - dvp: %X\n", dvp);
|
||||
@@ -131,11 +131,11 @@ void DrawDimHelper::makeExtentDim(DrawViewPart* dvp,
|
||||
int idx1 = DrawUtil::getIndexFromName(subElements[1]);
|
||||
v0 = dvp->getProjVertexByIndex(idx0);
|
||||
v1 = dvp->getProjVertexByIndex(idx1);
|
||||
if ( (v0 != nullptr) &&
|
||||
if ( (v0 != nullptr) &&
|
||||
(!v0->cosmeticTag.empty()) ) {
|
||||
tag0 = v0->cosmeticTag;
|
||||
}
|
||||
if ( (v1 != nullptr) &&
|
||||
if ( (v1 != nullptr) &&
|
||||
(!v1->cosmeticTag.empty()) ) {
|
||||
tag1 = v1->cosmeticTag;
|
||||
}
|
||||
@@ -198,15 +198,15 @@ std::pair<Base::Vector3d, Base::Vector3d> DrawDimHelper::minMax(DrawViewPart* dv
|
||||
}
|
||||
|
||||
//can't use Bnd_Box2d here as BndLib_Add2dCurve::Add adds the poles of splines to the box.
|
||||
//poles are not neccessarily on the curve! 3d Bnd_Box does it properly. FC bbx3 is already calculated
|
||||
//poles are not necessarily on the curve! 3d Bnd_Box does it properly. FC bbx3 is already calculated
|
||||
//bbx3 is scaled??
|
||||
// double scale = dvp->getScale();
|
||||
|
||||
|
||||
Base::BoundBox3d bbx3 = dvp->getBoundingBox();
|
||||
|
||||
double xMid = (bbx3.MaxX + bbx3.MinX) / 2.0;
|
||||
double yMid = (bbx3.MaxY + bbx3.MinY) / 2.0;
|
||||
|
||||
|
||||
gp_Pnt2d rightMid(bbx3.MaxX, yMid);
|
||||
gp_Pnt2d leftMid(bbx3.MinX, yMid);
|
||||
gp_Pnt2d topMid(xMid, bbx3.MaxY);
|
||||
@@ -390,7 +390,7 @@ DrawViewDimension* DrawDimHelper::makeDistDim(DrawViewPart* dvp,
|
||||
if (!dim) {
|
||||
throw Base::TypeError("DDH::makeDistDim - dim not found\n");
|
||||
}
|
||||
|
||||
|
||||
dim->References2D.setValues(objs, subs);
|
||||
|
||||
dvp->requestPaint();
|
||||
@@ -398,4 +398,3 @@ DrawViewDimension* DrawDimHelper::makeDistDim(DrawViewPart* dvp,
|
||||
|
||||
return dim;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# FreeCAD module provding base classes for document objects and view provider
|
||||
# FreeCAD module providing base classes for document objects and view provider
|
||||
# (c) 2011 Werner Mayer LGPL
|
||||
|
||||
import FreeCAD
|
||||
|
||||
class DocumentObject(object):
|
||||
"""The Document object is the base class for all FreeCAD objects."""
|
||||
|
||||
|
||||
def __init__(self):
|
||||
self.__object__=None
|
||||
self.initialised=False
|
||||
#------------------------------Methods for the user to override :
|
||||
|
||||
|
||||
def execute(self):
|
||||
"this method is executed on object creation and whenever the document is recomputed"
|
||||
raise NotImplementedError("Not yet implemented")
|
||||
@@ -22,7 +22,7 @@ class DocumentObject(object):
|
||||
#will be called each time a property is changed
|
||||
pass
|
||||
#--------------------------------
|
||||
|
||||
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if attr !="__object__" and hasattr(self.__object__,attr):
|
||||
@@ -265,19 +265,19 @@ class ViewProvider(object):
|
||||
return self.__vobject__.Object
|
||||
|
||||
|
||||
#Example :
|
||||
#Example :
|
||||
import Part
|
||||
|
||||
class Box(DocumentObject):
|
||||
#type :
|
||||
type = "Part::FeaturePython"
|
||||
|
||||
|
||||
#-----------------------------INIT----------------------------------------
|
||||
def init(self):
|
||||
self.addProperty("App::PropertyLength","Length","Box","Length of the box").Length=1.0
|
||||
self.addProperty("App::PropertyLength","Width","Box","Width of the box").Width=1.0
|
||||
self.addProperty("App::PropertyLength","Height","Box", "Height of the box").Height=1.0
|
||||
|
||||
|
||||
#-----------------------------BEHAVIOR------------------------------------
|
||||
def propertyChanged(self,prop):
|
||||
FreeCAD.Console.PrintMessage("Box property changed : "+ prop+ "\n")
|
||||
@@ -287,22 +287,22 @@ class Box(DocumentObject):
|
||||
def execute(self):
|
||||
FreeCAD.Console.PrintMessage("Recompute Python Box feature\n")
|
||||
self._recomputeShape()
|
||||
|
||||
|
||||
#---------------------------PUBLIC FUNCTIONS-------------------------------
|
||||
#These functions will be present in the object
|
||||
def customFunctionSetLength(self,attr):
|
||||
self.Length = attr
|
||||
self._privateFunctionExample(attr)
|
||||
|
||||
|
||||
#---------------------------PRIVATE FUNCTIONS------------------------------
|
||||
#These function won't be present in the object (begin with '_')
|
||||
def _privateFunctionExample(self,attr):
|
||||
FreeCAD.Console.PrintMessage("The length : "+str(attr)+"\n")
|
||||
|
||||
|
||||
def _recomputeShape(self):
|
||||
if hasattr(self,"Length") and hasattr(self,"Width") and hasattr(self,"Height"):
|
||||
self.Shape = Part.makeBox(self.Length,self.Width,self.Height)
|
||||
|
||||
|
||||
|
||||
def makeBox():
|
||||
FreeCAD.newDocument()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** \addtogroup WORKBENCHES
|
||||
Most of FreeCAD's functionality is defined in dedicated Workbenches
|
||||
|
||||
Those plugins, also called \b modules or \b worbenches, provide
|
||||
Those plugins, also called \b modules or \b workbenches, provide
|
||||
functionality for specialized facets of FreeCAD. The word \b module
|
||||
refers to any new group of tools, while \b workbench designates
|
||||
specifically a GUI group of tools in the FreeCAD interface. All
|
||||
@@ -28,4 +28,3 @@
|
||||
* \ingroup WORKBENCHES
|
||||
* \brief Modules that provide utility tools to FreeCAD but don't define a workbench
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user