Commit Graph

17 Commits

Author SHA1 Message Date
luz paz
110860fa47 Part: Part.CompoundTools.Explode.explodeCompound access a property of...
...a sometimes null object with an error

Python code, file `src/Mod/Part/CompoundTools/Explode.py`
The `explodeCompound` function can be called in a context without assigning the `ViewObject` property, for example from a command line script.

The error that is fixed by this patch. 
```
Traceback (most recent call last):
  ...
  File "/opt/freecad/Mod/Part/CompoundTools/Explode.py", line 23, in explodeCompound
    cf.ViewObject.DontUnhideOnDelete = True
AttributeError: 'NoneType' object has no attribute 'DontUnhideOnDelete']
```

Patch submitted by marioamb.  
Fix #004421  
https://tracker.freecadweb.org/view.php?id=4421
2021-02-21 11:40:20 +01:00
vocx-fc
0eafaa3031 Part: update icon, object and command for CompoundFilter
The previous icon did not follow the general style and colors
of other icons in the workbench.

If there is no `Stencil` in the `CompoundFilter` object, raise
a `ValueError` exception when the `FilterType` is `'collision-pass'`
or `'window-distance'`.

Raise an exception when `items` is empty, or has a malformed string,
when `Filtertype` is `'specific items'`.

Fix the `getNullShapeShape` function to return a simple
`Part.Shape`, so that there is no error raised if `_nullShapeShape`
doesn't exist. This function doesn't work at all. It was probably
a prototype which was never fully developed; it may be removed
completely in the future.

The docstrings for the commands `CompoundFilter` and `ExplodeCompound`
were revised.

Clean up the spacing of the code so that lines aren't very long.
2020-10-13 12:49:54 +02:00
vocx-fc
f439384ccb Part: small cleanup of Python modules and InitGui.py
Add empty newline at the end of the file.
2020-10-13 12:49:54 +02:00
vocx-fc
3b671bf4a5 Part: move icons to booleans subdirectory
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
2020-10-12 19:54:11 +02:00
luz.paz
180805c55e Fix typos
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,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,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
```
2020-03-06 14:50:35 +01:00
Bernd Hahnebach
1ac9099e79 FEM and Part: check if catched exception has an error message 2020-01-07 23:01:47 +01:00
Bernd Hahnebach
6f52e8425e Part: compound filter, fix gui object delete if obj has no Base anymore 2020-01-07 14:56:52 +01:00
luz.paz
53bb216b57 Part: [skip ci] fix header uniformity
This PR fixes header uniformity across all Part WB files
2019-12-22 00:59:47 +01:00
luz.paz
4cfda0c3a5 Misc. typos
Found via `codespell`
2019-02-08 11:01:24 -02:00
DeepSOIC
368f0f0ccd Part: "Explode compound" tool 2018-12-27 14:30:04 +01:00
Janne Keränen
6781a8167f Correct small bug in CompoundFilter in command line
Without this, CompoundFilter does not work in Python script in non-GUI-mode.
See:
https://forum.freecadweb.org/viewtopic.php?f=10&t=27593&p=222303
and
https://www.freecadweb.org/tracker/view.php?id=3381
2018-05-28 16:55:15 +02:00
DeepSOIC
2c78478b5c Part: fix compoundfilter's items property tooltip
reported by chrisb:
https://forum.freecadweb.org/viewtopic.php?f=3&t=28299#p229889
2018-04-25 10:58:30 +02:00
looooo
3e8249a0e6 py3: fix some simple incompapilities
issue 0000995
2017-06-21 11:25:30 +02:00
looooo
ef22d5202d py3: define xrange for python3
this is done in files where the xrange is used.
replace this with range once python2 is not supported anymore.
issue 0000995
2017-05-18 15:56:09 +02:00
Bernd Hahnebach
a8fc6b39b4 Part: BOPTools and CompoundFilter, remove not needed overwrting of setEdit and unsetEdit which prevents some C++ sedEdit modes to work 2017-03-20 10:59:02 -03:00
Bernd Hahnebach
54bbd79b03 Part: compound filter, GUI command 2017-02-18 15:57:54 +01:00
Bernd Hahnebach
8369d68c8f Part: compound filter, core module 2017-02-18 15:57:54 +01:00