Commit Graph

95 Commits

Author SHA1 Message Date
bgbsww
a674729dd3 Toponaming: Cleanups 2024-06-28 11:57:43 -05:00
Zheng, Lei
7a4bc95d47 Toponaming: Transfer in missing Code for BaseFeatures and Sketches 2024-06-28 11:57:43 -05:00
Chris Hennes
64fbafe30e Merge pull request #12589 from NomAnor/pd-trans-body
Add a new mode to PD patterns that will transform the base feature's shape instead of the tool shapes
2024-06-03 10:46:33 -05:00
André Althaus
0b5e993b90 Fix solid feature detection for "Transform Body" mode
Because the Origins property is empty in "Transform Body" mode, the
features are detected as not solid.
This messes with the feature order on insertions and moves.

This is fixed by calling the isMultitransformChild() method of the
Transformed features instead of checking the Origins property in the
Body code.
2024-05-23 12:23:32 +02:00
Pieter Hijma
ec841ed6d4 Core: Add VarSets to Groups
If a Group is selected, add the VarSet to the group.
2024-05-21 09:59:49 +02:00
Kacper Donat
f8c47b55cb PartDesign: Introduce ability to disable single-solid rule
This adds "SingleSolidRuleMode" enum that controls if PartDesign will
enforce singular solid. By default the single-solid is enforced so
nothing changes for the user, it must be explicitly disabled by setting
new Allow Compound boolean property on a given body.

Default for this value is controled using user parameter under
Mod/PartDesign/AllowCompoundDefault
2024-05-20 12:25:36 -04:00
Florian Foinant-Willig
6adc675a12 PartDesign: modernize type checking 2023-10-23 18:08:16 +02:00
wmayer
9a1f8a11d6 PD: modernize C++: use range-based for loop 2023-08-16 21:54:56 -05:00
Chris Hennes
1995d84edd PD: Add translation to error messages 2023-04-28 11:32:56 -05:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
07ddfc88de [PD] App: remove superfluous nullptr checks
- also Body: get rid of some nasty single-letter variables
2022-07-17 18:07:00 +02:00
wmayer
d492ac3083 PD: fixes #6451: Face color of PartDesign Body not exported to STEP 2022-05-24 16:42:27 +02:00
wmayer
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
c7e48869b6 [PD] Body and utils: remove unused includes 2022-02-20 21:23:05 +01:00
luz paz
56ce278abf Fix typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,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,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ontop,orgin,orginx,orginy,ot,pard,parms,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,./build/doc/SourceDocu`
2021-06-17 08:02:57 +02:00
David Osterberg
59ec3cb141 PartDesign: New features AdditiveHelix and SubtractiveHelix
These features, based on the code for the Pipe class, allow the user
to simply create a helical sweep within PartDesign workbench.

Sample application is threads, springs, coils, augers, etc.

Also, remove needless requirement for positive cone angle on helixes.

Thanks to @bitacovir for helping with the icons
Thanks to @chennes for review
Thanks to @vosk for review
Thanks to @wwmayer for review

Enforce that links stay within scope for ProfileBased features
This also ensures that the Body itself is not used for creating features within
the body, causing a "Graph not a DAG" error.
2021-02-04 13:01:12 +01:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
Zheng, Lei
8952306088 PartDesign: fix Body getSubObject() 2019-10-16 10:55:53 +02:00
Zheng, Lei
35c5e5a8a9 PartDesign: do not touch body on child change 2019-08-30 13:31:19 +02:00
luz.paz
039d6eac01 Fix typos in various src/Mod directories 2019-08-17 15:32:49 +02:00
Zheng, Lei
11a93a0578 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
ff1d1cd341 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
7acdb56d92 Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
wmayer
2fb62cf0a1 improve whitespaces 2018-09-22 13:40:28 +02:00
wmayer
5c40496cf3 fixes #0003514: Program crashes when user try to add (by mistake) the origin to a group 2018-09-12 19:01:25 +02:00
wmayer
70399e6c9c fixes #0003302: PDN cloned object have duplicated 'Unnamed' ghost on every file reopen 2018-01-30 19:26:06 +01:00
wmayer
4d36757636 improve whitespaces 2018-01-22 20:06:12 +01:00
Abdullah Tahiri
01e6cde7aa PartDesign: Fix bug of mirror transformation of multiple features
fixes #3317

This code ensures that an individual transformation or a multi-transformation have a proper
base feature and next feature.
2018-01-22 19:56:58 +01:00
wmayer
7d4eafbab0 if an Undo/Redo is performed then do nothing inside the body feature 2017-09-21 19:00:26 +02:00
Stefan Tröger
de31528dda PartDesign: Make Base Feature compatible with GeoFeatureGroup. fixes #0003080
The Original BaseFeature implementation had some serious issues with scoped links. It failed completely for e.g. sketches on the BaseFeature as it made a local link to refere to a out of body object. The only solution to make this work correctly is to add a proxy object into the body which is alloed to exactly that, to link outside oof the body. Something like shapebinder.
2017-09-21 11:40:14 +02:00
Stefan Tröger
972b89d0a0 Make PartDesign::Boolean work with new Link structure
This is the first feature that used GeoFeatureGroupExtension and required links to the groups inside as well as to things on the same level. Hence a few modifications to link scopes have been nesseccary.
2017-09-09 16:55:55 +02:00
Stefan Tröger
bfb95e3d12 Partially fix PartDesign move test 2017-06-19 15:37:09 +02:00
Stefan Tröger
f9200f4502 Extend python interface for groups and fix test cases 2017-06-19 15:37:09 +02:00
Stefan Tröger
183a4b4ef3 GeoFeatureGroup: Handle drag into document 2017-06-19 15:37:09 +02:00
wmayer
a86583e833 fix crash when trying to drag and drop origin object in body object 2017-04-06 19:16:27 +02:00
Stefan Tröger
109f8690ee Extensions: Fix GeoFeatureGroup drag&drop 2017-01-04 16:01:58 +01:00
Stefan Tröger
d2764a3c7a PartDesign: Adopt python interface to body group 2017-01-04 16:01:58 +01:00
Stefan Tröger
b4a569e013 PartDesign: Change body viewprovider to group 2017-01-04 16:01:58 +01:00
Stefan Tröger
9a3b952fb9 PartDesign: Port body to be a origin group 2017-01-04 16:01:58 +01:00
Stefan Tröger
8bf5f03671 PartDesign: Fix crash on pattern abort 2016-11-28 22:13:41 +01:00
Sergo
8b7b720beb PartDesign: fix Polar and Mirror accepting Datum 2016-09-30 11:09:00 -03:00
wmayer
664cf65d26 fix -Wextra in PartDesign 2016-09-22 18:34:56 +02:00
Wolfgang E. Sanyer
7f4a437cc2 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
Alexander Golubev
0cfc0cd424 Fix warnings introduced in new PartDesign
Mostly unused wariables and compare of signed & unsigned
2016-04-12 18:12:21 +02:00
Alexander Golubev
1f3d2df4d5 PartDesign/Body: add ability to store facebinders inside a body 2016-04-12 18:12:20 +02:00
Alexander Golubev
26fb01b429 PartDesign/Gui: add origin sizing and rework datums sizing 2016-04-12 18:12:18 +02:00
Alexander Golubev
1a26f7551f PartDesign: add Origin to the Body and unstrap the module from the Parts 2016-04-12 18:12:18 +02:00
Alexander Golubev
797d6d3a11 App/Origin: big refactoring
- Rebase App::Origin on App::DocumentObject
 - Keep all control over the Origin structure inside the Origin and it's
   ViewProvider
 - Add OriginFeature class as common base for App::Plane and App::Line
 - Rebase App::Plane and App::Line on top of newly created class and
   move to the file.
 - Change Origin's ViewProvider API associated with temporary display
 - Lots of associated changes to files
 - Several minor fixes
 - Lots of new bugs
2016-04-12 18:12:18 +02:00
Alexander Golubev
c6797b6c29 Revert "part deletion handling"
This reverts commit 6ab2002021ac1df26ebe77f488f5cd94e1df0b26.
2016-04-12 18:12:17 +02:00
Alexander Golubev
5016054a8b PartDesign/Body: move deletion of subobjects to view provider 2016-04-12 18:12:17 +02:00