Commit Graph

1289 Commits

Author SHA1 Message Date
wmayer
fe103a482f PartDesign: add/remove features to list view in linear pattern panel 2020-02-15 15:55:11 +01:00
donovaly
01598a8bb4 fix logic
now also the case that one switches from add mode directly to remove mode is correctly handled
also remove doubled code that is already executed
2020-02-15 04:30:26 +01:00
donovaly
1dfa6d40b4 [PD] enable to de/selecet several entities at once
see https://forum.freecadweb.org/viewtopic.php?f=19&t=43383
2020-02-15 04:07:09 +01:00
Zheng, Lei
17d7f09fc8 PartDesign: fix FeatureDressUp base checking 2020-02-14 13:34:03 +01:00
Zheng, Lei
379e07ef30 PartDesign: support transformed pattern in FeatureDressUp
Fixes #1650
2020-02-14 13:34:03 +01:00
wmayer
60d9607112 PartDesign: use QKeySequence::Delete instead of a QString 2020-02-14 10:11:09 +01:00
donovaly
0310a99f4e [PD] add shortcut to context menus
- people should be informed that there is a shortcut available (that was recently added)
- make the shortcut also translatable since "Del" means nothing in e.g. German
- minor code style fix in TaskDressUpParameters.h
2020-02-14 09:59:46 +01:00
donovaly
24ec114cb8 remove program-specific SVG namespaces
while fixing a SVG export issue for techDraw I noticed that some SVG files have program-dependent (and thus not clean) code in it. These are traces of the programs Sodipodi and Inkscape, like e.g. this line:
inkscape:export-filename="/home/yorik/PartDesign_Groove.png

This is unnecessary and FC should not use program-dependent code in the SVG but use instead plain SVG strictly following the SVG specification.

This PR transforms the few affected SVGs to a plain version.
2020-02-07 07:34:49 -05:00
wmayer
4cdf939025 issue #0004258: FreeCAD crashes on "Edit datum" in PartDesign when datum in Part [skip-ci] 2020-01-30 16:07:17 +01:00
MA-LAPTOP\apeltauer
7a8ac5bc49 make some header include adoption for open cascade 7.4.0 2020-01-27 10:15:32 +01:00
wmayer
0a5028f181 issue #0004188: Editing a subtractive box in PartDesign doesn't show the shaded box 2020-01-15 10:00:47 +01:00
wmayer
798edb8a55 fixes #0004188: Editing a subtractive box in PartDesign doesn't show the shaded box 2020-01-15 01:33:28 +01:00
wmayer
8fdb29c842 Mod: [skip ci] implementation classes don't inherit from UI classes any more 2020-01-10 16:19:35 +01:00
wmayer
52fdc66003 PartDesign: [skip ci] set explicit encoding of Python files for backward compatibility 2020-01-09 17:07:04 +01:00
wmayer
141c3bca53 fixes #0004158: FreeCAD crashes when deleting spline [skip ci] 2020-01-03 14:24:53 +01:00
wmayer
ecfcc30fee PartDesign: [skip ci] replace int with proper enum type 2019-12-30 17:19:59 +01:00
Zheng, Lei
3b8ed7a791 PartDesign: improve SubShapeBinder transformation cache 2019-12-30 17:17:14 +01:00
Zheng, Lei
2034323bf4 PartDesign: fix SubShapeBinder lost of placement 2019-12-30 17:17:14 +01:00
Zolko-123
08a0b01c06 Manual dimension centers the plane's view
With the current manual dimensions a Datum Plane is visually ex-centred from it's origin, so when drawing a circle the circle is outside of the Plane representation. With this proposed change the visual representation is centred.
2019-12-24 01:17:46 +01:00
luz.paz
dc8bf3dc39 PartDesign: [skip ci] fix header uniformity
This PR fixes header uniformity across all PartDesign WB files
2019-12-22 00:58:38 +01:00
wmayer
8bed7e4bd1 issue #0004225: FreeCAD crash when making draft in PartDesign [skip ci] 2019-12-16 15:26:34 +01:00
vocx-fc
d65225124f PartDesign: rename icon, and organize resource file 2019-12-06 14:35:14 -03:00
vocx-fc
6777f91e40 Gui: PartDesign: remove execute bit from icons, now 644 2019-12-06 14:34:25 -03:00
wmayer
7651a99914 [skip ci] fix SyntaxWarning: 'is not' with a literal. Did you mean '!='? 2019-11-25 16:29:56 +01:00
asapelkin
7b8f473cc9 used in-built methods instead of external algoritms 2019-11-21 18:57:06 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
luz.paz
30d2e29e0c LGTM: various fixes for using string operator instead of numeric 2019-10-25 10:33:12 -03:00
Zheng, Lei
38fd061716 PartDesign: fix Body getSubObject() 2019-10-16 10:55:53 +02:00
Zheng, Lei
c146fbbdba Replace use of Matrix.inverse() with inverseGauss()
Because of possible scaling involved.
2019-10-07 17:24:30 +02:00
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
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`
2019-10-03 07:57:13 +02:00
wmayer
b1dd1e61a7 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02:00
wmayer
f0a1b46b5c support to load old project files with PD draft object, restore handling with constraints 2019-09-14 19:57:31 +02:00
mwganson
35aa7bf313 [PartDesign] Draft angle property change from App::PropertyFloatConstraint to App::PropertyAngle 2019-09-14 19:05:29 +02:00
DeepSOIC
f19e21a224 PartDesign: change view sizing on new sketch 2019-09-11 21:39:16 +02:00
0penBrain
f5a2eb0f59 PartDesign : make possible to prevent auto-switching to PartDesign WB when a Body is activated
* Use a boolean parameter located at BaseApp/Preferences/Mod/PartDesign/SwitchToWB
   * resolves #2703
2019-09-11 21:32:41 +02:00
Matthias Berberich
beebebc6b2 add intersection-toggle to thickness-tool
see: “Thickness tools is missing intersection-toogle”
https://forum.freecadweb.org/viewtopic.php?f=19&t=37952
2019-09-11 20:50:33 +02:00
Zheng, Lei
e976232ed7 PartDesign: fix ViewProviderBody tip icon update 2019-09-07 16:59:55 +02:00
Zheng, Lei
432c9ae15b Gui/PartDesign: fix setActiveObject() for Part and Body 2019-08-30 15:02:48 +02:00
Zheng, Lei
d00dd4724b PartDesign: fix datum edit through external link 2019-08-30 14:53:03 +02:00
Zheng, Lei
5b8d2183fb PartDesign: add 'VisibleFeature' attribute to BodyPy 2019-08-30 13:34:41 +02:00
Zheng, Lei
42b4e4c0a9 PartDesign: do not touch body on child change 2019-08-30 13:31:19 +02:00
wmayer
33b6c9c293 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
2019-08-17 19:52:49 +02:00
luz.paz
b869b6e29e Fix typos in various src/Mod directories 2019-08-17 15:32:49 +02:00
Zheng, Lei
de93446a1c Test cases changes
Slight adjustment of various test cases due to various API changes.
2019-08-17 15:32:48 +02:00
Zheng, Lei
cd2b7e297c PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
Zheng, Lei
fc87332709 Gui: Placement/DatumCS view provider changes
* Add always zoom invariant and always on top rendering to
  ViewProviderDatumCS

* Add a new utility class AxisOrigin for more efficient axis rendering.
  Also exposed to python.

* Change ViewProviderPlacement to use AxisOrigin for rendering.
  A single instance of AxisOrigin is shared by all
  ViewProviderPlacement. Selection context is used to distinguish among
  different instances.
2019-08-17 15:08:34 +02:00
Zheng, Lei
5214f5b7ce Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +02:00
Zheng, Lei
6731e83bf5 App: add New APIs for future Link function
DocumentObject:

* getSubObject(): the most important API for Link to work with
  hierarchies. The function is a inspired from and replaces the
  getPySubObjects(). It returns a child object following a dot separated
  subname reference, and can optionally return accumulated
  transformation, and/or a python object of the refered
  sub-object/element. The default implementation here is to look for
  link type property, and search for the referenced object. This patch also
  include other specialized implementation of this API, such as
  (GeoFeature)GroupExtension (through extensionGetSubObject()),
  PartDesign::Body, and so on. A link type object is expected to
  call the linked object's getSubObject() for resolving.

* getSubObjectList(): helper function to return a list of object
  referenced in the given subname.

* getSubObjects(): return a list of subname references of all children
  objects. The purpose of this function is similar to
  ViewProvider::claimChildren().  Container type object is expected to
  implement this function.  The reason it returns subname references
  instead of just object is to allow the container to skip hierarchies.
  For example, the Assembly3 container uses this to skip the constraint
  and element group.

* getLinkedObject(), obtain the linked object, and optionally with the
  accumulated transformation. It is expected to return a linked object
  or the object itself if it is not a link. In case there are multiple
  levels of linking involved, this function allows the caller to retrieve
  the linked object recursively.

* hasChildElement(), set/isElementVisible(), controls the children
  visibility for a group type object. Because the child object may be
  claimed by other objects, it is essential to have independent control
  of children visibilities. These APIs are designed to abstract how
  group manages the child visibility. For performance reason, these
  function are meant to control only the immediate child object.

* resolve(), helper function to parse subname reference and resolve the
  final object, and optionally the immediate parent of the final object,
  the final object reference name (for calling `set/isElementVisible()`),
  and the subname reference if there is one.

* touch(), add optional argument 'noRecompute' for better backward
  compatibility with the NoRecompute flag. By default, touch() causes
  recompute unless noRecompute is true

* signalChanged/signalBeforeChange, two new signal for tracking changes
  of a specific object.

* getViewProviderNameOverride(), return a string of the view provider
  type of this object. This allows Python class to override the view
  provider of an object. This feature will be used by ViewProviderLink
  which is designed to work with any object that has LinkBaseExtension.

* canLinkProperties(), will be used by Gui::PropertyView to display
  linked object properties together with the object's own properties.

* redirectSubname(), will be used by Gui::Tree to allow an object to
  redirect selection to some other object when (pre)selected in the tree
  view.

* Visibility, new property serve as the same purpose as view provider
  property of the same name. It is added here so that App namespace
  code can check for visibility without Gui module. This is useful,
  for example, when constructing a compound shape of a container that
  respects the children visibility.

* (has)hasHiddenMarker(), return or check for a special sub-element
  name used as marker for overriding sub-object visibility. Will be
  used by Gui::ViewProvider, it is put here for the same reason as
  adding Visibility property.

* getID(), return object internal identifier. Each object is now
  assigned an integer identifier that is unique within its containing
  document.

Document:

* ShowHidden, new property to tell tree view whether to show hidden
  object items.

* signalTouchedObject, new signal triggered when manually touch an
  object when calling its touch() function

* getObjectByID(), get object by its identifier

* addObject() is modified to allow overriding view provider

* has/getLinksTo(), helper function to obtain links to a given object.

Application:

* checkLinkDepth(), helper function to check recursive depth for link
  traversal. The depth is checked against the total object count of
  all opened documents. The count (_objCount) is internally updated
  whenever object is added or removed.

* has/getLinksTo(), same as Document::has/getLinksTo() but return links
  from all opened documents.

GroupExtension/OriginGroupExtension/DatumFeature/DatumCS/Part::Feature:
implement sepcialized getSubObject/getSubObjects().
2019-08-17 14:52:08 +02:00
0penBrain
90044b1283 Add basic ability that PartDesign doesn't switch to Task panel when activated => Add a 'SwitchToTask' boolean parameter to Mod/PartDesign and set to 'false' to prevent switching 2019-07-13 12:56:09 -03:00
wmayer
61b0755c89 automatically redirect to tip object in case body display mode is set to Tip and a face was selected to create a new sketch 2019-07-08 11:46:09 +02:00