Commit Graph

62 Commits

Author SHA1 Message Date
Benjamin Nauck
dd6aa9f3c7 Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
bgbsww
ecf7e51ab3 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
wmayer
d4325a6bd8 Part: Add FaceMakerMode of type PropertyEnumeration
This is added to conveniently change the face maker type of an extrusion object.

Hint: A new property is used to avoid to break project files when opening it with an older version.
2024-06-03 11:29:01 -05:00
bgbsww
a88e7baff5 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
bgbsww
c31ebeeee6 Toponaming/Part: cleanup FeatureExtrusion 2024-03-20 20:45:06 -04:00
Zheng, Lei
4697de1c2d Toponaming/Part: bring in FeatureExtrusion and dependencies 2024-03-19 17:33:09 -04:00
Chris Hennes
70e707217e Merge branch 'main' into facemakerTranslationFix 2024-02-12 10:45:47 -06:00
Chris Hennes
84380b3a56 Part: Fix translation bug in FaceMaker 2024-01-22 12:14:54 -06:00
Zheng, Lei
f4cc2df2bd Toponaming move makEFace as makeElementFace and dependencies 2024-01-17 20:38:50 -05:00
wmayer
0d854a56cd Part: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
wmayer
312975edba Part: modernize C++: use range-based for loop 2023-08-16 21:56:32 -05:00
wmayer
735eecc42b Part: fix build failures with OCC >= 7.6 2022-08-09 18:42:38 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
Uwe
4bbd240e5f [Part] FeatureExtrusion.cpp: add necessary include 2022-07-09 16:20:24 +02:00
Uwe
7030956099 [Part] Feature*: remove unneeded includes
- also sort includes
2022-07-09 15:59:22 +02:00
mwganson
26e4a3345b Part: Link support -- replace TopoShape.getSubShape() with Part::Feature::getTopoShape(obj, elementname, true).getShape() in order to support use of App::Link sublinks. 2022-05-27 03:52:17 +02:00
wmayer
068c0e5a98 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
f16a0da841 [Part] FaceMaker, Command and Extrusion: remove unused includes 2022-02-21 03:33:01 +01:00
Uwe
cfdf334b7f [PD] add option to create tapered Pad / Pocket
This PR adds the same functionality as provided by Part Extrude.
The used code parts are sorted out to a new helper function that is used by Part and PartDesign.
2022-02-02 01:04:06 +01:00
Uwe
065e87f313 [Part] Extrusion: stop if intermediate shape is Null
besides the error message, we need to raise an error

- also fine-tune the wording
2022-01-31 01:07:33 +01:00
Uwe
d455783ebe [Part] Extrusion: fix logic issue
has actually no influence on the output but is important to understand the logic of the code
2022-01-31 00:23:33 +01:00
Uwe
647b54302f [Part] Extrusion: fix CI compiler warning
fixes "warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int'"
2022-01-30 22:46:07 +01:00
Uwe
754fc5f9ae [Part] Extrusion: code simplification and documentation
- in order for the pending PR to add tapered padding/pocketing
2022-01-30 19:37:41 +01:00
Uwe
7c55db58d1 [Part] Extrusion: handle also complex nested structures
- there can be strange cases with structures all intersecting each other. Their extrusion has no practical use case but we must avoid that such structures results either in an infinite loop or in an invalid geometric result.
2022-01-30 18:43:11 +01:00
Uwe
55f71f4015 [Part] Extrude: fix a thinko introduced by previous commit
- the handling of all inner wires must be done within the recursion
2022-01-30 17:41:40 +01:00
Uwe
29997d5e71 [Part] Extrusion: simplify code by using full recursion
- the recursion can be done completely by one void
- also add a brief description of this void
2022-01-30 16:53:44 +01:00
Uwe
8eab4a397e [Part] Extrusion: code optimizations
kudos to @marioalexis84
2022-01-30 06:02:37 +01:00
Uwe
63c864c5b6 [Part] Extrusion: taper nested wires properly
addendum to commit cce730c79

Now also wires nested by more than one level are supported.
The possible nesting is infinite.
2022-01-30 05:52:43 +01:00
Uwe
99d9e781fc [Part] Extrude: remove unused variable 2022-01-29 23:18:11 +01:00
Uwe
cce730c79d [Part] handle inner wires for Extrude (#5367)
* [Part] handle inner wires for Extrude

this is a PR to make Extrude handle inner wires of sketches.
2022-01-29 21:50:55 +01:00
luz paz
da6f34723b Part: fix source comment typo 2022-01-22 16:28:41 +01:00
Uwe
fcaa698be8 [Part] Extrusion: just style fixes
to keep following PR diffs small

all changes were automatically done by MSVC
2022-01-20 01:08:35 +01:00
Uwe
af45d932c4 [Part] Extrude: avoid code duplication
more code that is used twice into a subroutine
2022-01-17 16:58:03 +01:00
Uwe
a3b3134594 [Part] just style fixes
to keep following PR diffs small

all changes automatically done by MSVC
2022-01-17 01:08:48 +01:00
Uwe
cf0764c1b5 [Part] sort includes 2022-01-09 21:59:02 +01:00
wmayer
d5d7d65bfc LGTM: [skip ci] fix: Large object passed by value 2020-07-24 18:32:31 +02:00
Zheng, Lei
6da72b9859 Part: changes to Part Module
* Added Part::Feature::getTopoShape/getShape() function that can obtain
  shape from any object with proper implementation of getSubObject(). It
  can even construct compound from group object with proper implementation
  of getSubObjects().

* Modified ViewProviderExt to work on any object, because it now obtain
  the shape using Part::Feature::getShape()

* Modified various Part features to obtain base/tool shapes using
  Part::getShape(), which allows them to be any type of object,
  including Link and groups.

* Modified various Part command to relax type requirement on selected
  objects.

* Add support of link and group to dimension, and add dimension refresh
  command

* Support link and group in simple command command, and add a few more
  copy command variations.

* Add special handling of 'Shape' attribute in PropertyContainerPy and
  use Part::Feature::getShape() to return shape for any object without
  Shape property. This allows many python feature work with any object
  without modification.

* GeometrySurface/CurvePy, add convenience attribute 'Rotation'

* TopoShapePy:

    * Extended support of sub shape attribute, e.g. Compound1, Solid2,
      SubShape3 ('SubShape' is used to access child shape of a compound)

    * makeWires(), new API to sort and return wires given a list of edges.

    * transformed/translated/rotated/scaled(), return a new shape with
      some transformation.

    * findPlane(), find the plane of a planar shape

    * isCoplanar(), check if two shape are coplanar
2019-08-17 15:08:35 +02:00
Abdullah Tahiri
a56658489b Part: Make 3rd party libraries into PCH 2019-05-02 07:09:22 +02:00
wmayer
4079c9603f fixes #0003788: Part-workbench extrude with taper angle delivers a wrong shape 2019-01-25 02:49:09 +01:00
wmayer
e02695b91f Replace Base::Exception with appropriate subclass 2018-11-14 19:45:20 +01:00
luzpaz
e883cbfdf3 Part: typos 2017-12-25 11:03:11 +01:00
wmayer
949c86d364 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
Peter Lama
a75a98ef27 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
Kunda
99c99006b8 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
DeepSOIC
d21f339a0f Part: Extrude, Revolve: fix #2720 - relax action of Solid=true
When facemakers were introduced, Solid property of Revolve and Extrude
was made strict: it calls facemaker if Solid==true, and facemaker would
fail if shape being extruded/revolved is a face.

This is fixed by testing there are no faces in source shape prior to
calling facemaker.
2016-10-04 21:51:58 +03:00
DeepSOIC
7b70711fb3 Part: FaceMaker: check if instance is actually created.
Part::FaceMaker::ConstructFromType() could return null pointer if
abstract class type is supplied.

Here, it is fixed by checking for null pointer in facemaker itself,
rather than in every place  ConstructFromType is being used.
2016-10-04 10:03:19 +02:00
wmayer
c833136cde handle possible crashes with FaceMaker and fix a few coding flaws 2016-10-02 14:47:59 +02:00
DeepSOIC
399cb4bda3 Part: Extrude: port to use FaceMaker
For old documents, default to old behavior. For new objects, default to
use FaceMakerBullseye
2016-10-01 23:13:44 +03:00
DeepSOIC
98418a4e0c Part: Extrude: improvements
* split Dir into Dir+Length; added second Length
* support for parametric linked direction: to arbitrary edge, and to
normal
* options: reverse, symmetric
* second taper angle
* changed offset join mode for tapered extrusion on OCCT7
2016-09-01 11:46:18 +02:00