Commit Graph

54 Commits

Author SHA1 Message Date
Uwe
4dced53a00 [Part] Pa* to Pre*: remove unneeded includes
- also sort includes
2022-07-03 20:47:03 +02:00
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
Abdullah Tahiri
e8d5d69314 Part: Part2DObject::seekTrimPoints rename parameters
====================================================

This function takes parameters named GeoId, which evoke the Sketcher GeoId and which
indeed are used by the sketcher. However, these indices are just indices of the provided
geometry list. Therefore:
1. The are never negative (no matter if a corresponding Sketcher GeoId is external or not).
2. They do not have reserved indices for axes.
3. Most importantly, not found GeoId1 and GeoId2 are coded as -1, which for the Sketcher has
a well defined meaning (axis), whereas the Sketcher uses Constraint::GeoUndef as undefined or
not present/ not found index, which currently is -2000.

For these reasons, it was judged appropriate to rename the parameters and documentation to
emphasise that this function is unrelated and dettached from any Sketcher knowledge, and that
indices are just normal indices of a vector.
2021-03-21 06:56:23 +01:00
Zhang Wei
8111c9e2e5 Patch for MIPS64 Architecture 2020-02-15 19:32:58 +01:00
wmayer
78274136c6 Part: determine tangent intersection of two 2d curves 2020-02-13 12:51:40 +01:00
luz.paz
17ada69518 Part: [skip ci] fix header uniformity
This PR fixes header uniformity across all Part WB files
2019-12-22 00:59:47 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
luz.paz
c7785267a7 Misc. typos and whitespace
Found via `codespell -q 3 --skip="*.po,*.ts,./.git,./src/3rdParty,./src/CXX,./src/zipios++,./src/Mod/Assembly/App/opendcm,./ChangeLog.txt" -I ../fc-word-whitelist.txt` and `grep`. Excess whitespace auto-removed by Atom editor.
2018-11-03 16:13:06 -03:00
wmayer
5536470348 improve whitespaces 2018-10-30 13:48:00 +01:00
Abdullah Tahiri
c04ee53aff Sketcher: Trimming support bug
==============================

OCCT Geom2dAPI_InterCurveCurve based intersector does not detect intersection with the endpoint of a tangent line:
https://tracker.dev.opencascade.org/view.php?id=30217

This is a work-around that introduces endpoints of secondary curves as intersections, and uses projection to reject
projections further away than precision::confusion().

fixes #2463
2018-10-30 13:41:40 +01:00
wmayer
980e95ce05 fix Debian bug #825861 2018-03-14 18:05:24 +01:00
Peter Lama
033334474c Rename superPlacement property to AttachmentOffset
The name Attachment Offset gives a better picture of what the
property does.
2017-11-05 16:41:25 +01:00
Peter Lama
fa4bebf2e0 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
Stefan Tröger
67d76b309c Port Attacher codde to the extension framework
AttachableObjects are desired in multiple occasions, and the current AttachableObject is not flexible enough to handle all cases. Hence the code is portet to an extension, which gives the needed flexibility.
2016-12-07 06:41:40 +01:00
wmayer
2d20bdecdd use only Python API for FeaturePythonPyT 2016-11-10 13:37:30 +01:00
DeepSOIC
3b030a08b2 Attacher: change Part2DObject to use Plane attacher by default 2016-05-13 19:54:44 +03:00
wmayer
0509fcfc9e + avoid code duplication 2016-05-05 18:38:36 +02:00
wmayer
ab43e18b00 + remove 'using namespace Attacher' inside header file 2016-04-13 15:57:49 +02:00
wmayer
d604abdfc4 + consistent naming 2016-04-13 11:37:09 +02:00
Alexander Golubev
305151be34 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
DeepSOIC
d009a5cd3d Attacher: line and point AttachEngines. Other changes.
* propose attachment modes
* refactor setUp and Copy
* split off postprocessing from 3D to reuse in 1D and 0D calculations
* AttachableObject: fix error printout in onChange
* AttachableObject: no more defaults to Attacher3D
* implementation of lines and points attachment (some of the proposed modes).
* refactor getShapeType, add getShapeType(obj, sub); add a flag to eRefType enum, indicating that referenced thing is a whole object that has placement.
* change readLinks to be static, and obtain shape types in the process.
* test mode enums lengths equality
* extend ObjectXY to work on conics.
* Fix upside-down sketches attached as TangentPlane on most shapes.
* Fix crash when a shape of unlisted type is in the links.
* fix attaching to datum lines go crazy because of infinities.
* abs->fabs
* support for App::Line
* Add namespace qualifiers to TYPESYSTEM_SOURCE-like stuff
2016-04-12 18:12:12 +02:00
DeepSOIC
b6152364af Attacher: change Part2DObject's MapMode default to mmDeactivated, and set mode to mmFlatFace only when reading files of old format.
PartDesign, Sketcher: set mapping mode when setting support

Mapping mode mmFlatFace is no longer default, so an explicit assignment
is required.
2016-04-12 18:12:12 +02:00
DeepSOIC
9a48d210cf PropertyLinkSubList, Sketcher: move legacy Support readout from PropertyContainer to Part2DObject 2016-04-12 18:12:12 +02:00
DeepSOIC
93fff0e65f Sketcher: new attachment engine 2016-04-12 18:12:12 +02:00
DeepSOIC
1b754d35c5 Sketcher: change Support from PropertyLinkSub to PropertyLinkSubList
Note: may fail to build after this commit...
2016-04-12 18:12:12 +02:00
DeepSOIC
1226fec82c Sketcher: fix free-standing sketches
See forum thread, Sketch support == NULL
http://forum.freecadweb.org/viewtopic.php?f=20&t=10942
2016-04-12 18:12:07 +02:00
jrheinlaender
5a0ac01640 Update SketchObject Placement when the Support property changes 2016-04-12 18:11:55 +02:00
jrheinlaender
d082f16bbf Try to be consistent with sketch plane orientation PartDesign module <-> Sketcher module 2016-04-12 18:11:50 +02:00
jrheinlaender
2d7813295b Allow selecting back of base planes, miscellaneous fixes 2016-04-12 18:11:50 +02:00
jrheinlaender
857ede8847 Moved generic Datum class to Part module to avoid Sketcher dependency on PartDesign 2016-04-12 18:11:49 +02:00
jrheinlaender
dc9c6b0e5d Miscellaneous fixes 2016-04-12 18:11:49 +02:00
jrheinlaender
34af72186c Make sure that App::Plane sketch placement is identical to deprecated SketchOrientationDialog placement 2016-04-12 18:11:49 +02:00
jrheinlaender
8390bbb999 Work on inserting, removing, hiding and showing features in the body 2016-04-12 18:11:48 +02:00
jrheinlaender
0a893135c8 Show three base planes (XY, YZ, XZ) at the beginning of the feature tree and allow to create sketches on them 2016-04-12 18:11:47 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
4a176cbe29 + fix various warnings 2015-08-29 22:05:09 +02:00
Ian Rees
33e0441c39 Cleaning up compile warnings, mainly in Sketcher
fabs() instead of std::abs(), add cmath include
2015-06-04 18:12:39 +02:00
wmayer
d4019e96f7 + fixes #0001874: Scripted constraints not evaluated correctly 2014-12-23 15:32:03 +01:00
Yorik van Havre
1e3c8f0025 Part: Fixed python representation of Part2DObject - fixes #1387 2014-02-24 16:10:51 -03:00
wmayer
605e85b952 Make FeaturePython Python binding a template class to avoid code duplication 2013-03-22 00:34:18 +01:00
logari81
135f534ff6 Part: Avoid code duplication in Part2DObject 2013-02-13 12:18:31 +01:00
logari81
3562efa5d5 PartDesign: Refactor pattern features and gui
- remove StdDirection,StdAxis and StdMirrorPlane properties
- support sketch H_Axis, V_Axis, N_axis as valid references in patterns
- polish reference selection gui (unified for standard axes and custom references)
2013-01-09 23:18:38 +01:00
wmayer
c8cacace17 Do some error checking for sketch based features 2012-12-13 20:59:53 +01:00
logari81
7eb5b9e6dc Sketcher: Enable positioning of sketches with the manual alignment tool 2012-12-10 13:58:45 +01:00
wmayer
640a71a863 Allow to use revolve tool on Draft objects 2012-10-22 14:06:29 +02:00
wmayer
591e36511d 0000624: Trim tool doesn't work with construction lines 2012-04-13 15:31:04 +02:00
logari81
3c9053a599 + preparation for external geometry constraints in the sketcher
+ change value of H_Axis and V_Axis constants
+ external Geometry transferred in reverse order from SketchObject to Sketch
+ replace construction property with external property in GeoDef
+ support negative geometry indices in the Sketch class
+ whitespace and variables naming improvements, typo fixes


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5340 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-24 00:25:34 +00:00
logari81
e2ce022839 + add axis link property to the PartDesign/Revolution feature
+ fix placement of the PartDesign/Revolution feature to the placement of its sketch/support


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5279 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-12 17:53:48 +00:00
logari81
fad7696ad4 + avoid code repetition in positioning of Sketch
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5254 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-10 15:14:56 +00:00
logari81
a5c8113aaa + fix wrong positioning of Sketch on rotated Support
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5240 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-08 20:10:57 +00:00