Commit Graph

623 Commits

Author SHA1 Message Date
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
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01: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
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
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
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
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
wmayer
bd1670fd76 make UpToLast option for pad working again 2019-06-17 16:14:13 +02:00
wmayer
4e5d6be326 fixes #0003979: Pocket with mode 'up to face' doesn't work correctly 2019-06-15 23:54:10 +02:00
wmayer
657bcef798 use ShapeBinder to create a copy from Origin feature 2019-06-15 15:43:29 +02:00
wmayer
741a7bc016 extend ShapeBinder to also handle Origin features 2019-06-15 15:07:52 +02:00
luz.paz
2b02659010 Misc. typo and whitespace fixes
Found via `codespell`
2019-05-30 19:56:12 +02:00
Abdullah Tahiri
7b0a501c0a PartDesign: 3rdParty to PCH 2019-05-02 07:12:27 +02:00
Abdullah Tahiri
8350a6f55b PCH for Sketcher/PartDesign 2019-05-01 09:05:55 +02:00
wmayer
047a18ccb5 PVS: V601 The bool type is implicitly cast to the double type
PVS: V668 There is no sense in testing pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error
2019-03-13 14:09:10 +01:00
wmayer
4ec8cc6f01 fix invalid static_cast 2019-03-06 16:56:26 +01:00
wmayer
f7704607a0 fixes 0003524: The PartDesign hole feature should respect the Reverse property and provide a checkbox in the panel 2019-02-22 21:10:05 +01:00
DeepSOIC
3a93be7c44 PartDesign: Shapebinder: fix placement
reported by koluna:
https://forum.freecadweb.org/viewtopic.php?f=20&t=33794
2019-02-04 22:19:23 -02:00
DeepSOIC
e49a45a46d PartDesign: Shapebinder: use compound instead of fusion 2019-02-04 22:19:23 -02:00
wmayer
2888ff2557 improve error messages for Pocket, Hole and Groove feature 2018-12-31 18:30:13 +01:00
Abdullah Tahiri
754dd89d42 PartDesign: Up to face inclined plane limitation
================================================

fixes #3177

I fixed it by tricking the function, see:
https://forum.freecadweb.org/viewtopic.php?f=8&t=24238&start=30#p274454
2018-12-24 11:01:59 -02:00
wmayer
7f0b408ecb prepare for OCCT 7.3.1 2018-12-14 15:51:10 +01:00
wmayer
00de5bb7ad Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
wmayer
36271b4052 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
wandererfan
0352559266 Fix spurious error message
-  in FeatureGroove, the check for multiple
   solids in result was checking the wrong
   variable.
2018-10-29 10:29:23 -03:00
wmayer
5ba61973c0 improve trace support of Shape binder 2018-10-07 22:11:53 +02:00
wmayer
052296ebce fixes 0003547: Linear pattern, mirrored and polar pattern feature not working on a hole just on pocket 2018-09-27 13:30:30 +02:00
wmayer
fdd4b9d00c in linear pattern handle selected edge of a 2d part object 2018-09-27 11:04:30 +02:00
wmayer
b230e8a872 improve whitespaces 2018-09-22 13:40:28 +02:00
wmayer
b3795b7579 fixes #0003582: ShapeBinder did not show correctly 2018-09-22 00:55:46 +02:00
wmayer
92d2705915 fix -Winconsistent-missing-override 2018-09-17 14:18:36 +02:00
DeepSOIC
e7485effb4 Part, PartDesign, Attacher: fix a few problems with infinite shapes
To throw an error instead of returning a semi-infinite result that kills rendering.
fixes #3439
2018-09-13 13:12:55 +02:00
wmayer
0b9f869ed7 fixes #0003514: Program crashes when user try to add (by mistake) the origin to a group 2018-09-12 19:01:25 +02:00
DeepSOIC
fde4dc2f67 PartDesign: Refine property for Boolean #3488 2018-09-11 07:16:58 +02:00
DeepSOIC
ae59630fa4 PartDesign: Refine property for primitives #3488 2018-09-11 07:16:49 +02:00
luz.paz
f6de3eac88 Whitespace formatting 2018-08-26 17:30:44 +02:00
luz.paz
53e122a75a Misc. typo fixes
Found via `codespell`
2018-08-26 17:30:44 +02:00
wmayer
501c5e0171 issue #0003177: Part Design Pad should allow besides 'Up to face' something like 'Up to plane' as well 2018-08-26 13:22:35 +02:00
wmayer
fc0f10c0de avoid that Datum plane is always touched when automatically resizing it from within its own view provider 2018-08-25 11:09:15 +02:00
wmayer
4d28a062fc CMP0050: make PartDesign module aware of cmake policy 2018-08-20 17:19:04 +02:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00