Commit Graph

1220 Commits

Author SHA1 Message Date
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
Christophe Grellier
67ecfb6a1d Update BSplineSurfacePyImp.cpp
Typo in setVKnot()
2021-08-15 11:16:01 +02:00
wmayer
7e48441687 Part: [skip ci] workaround for OCCT 7.5.2 2021-05-12 17:35:42 +02:00
Yorik van Havre
80ecefde1a Merge pull request #4770 from mpu-creare/master
Mod Part [doc]: Adding documentation to Part.BSplineCurve of Python API
2021-05-11 12:15:59 +02:00
wmayer
a6e7bdf849 allow to enable PCH for gcc and clang 2021-05-03 17:37:58 +02:00
Matt Ueckermann
3d1176053f Part [DOC]: Adding documentation to Python API of BSplineCurve (intersect and buildFromPoles) 2021-04-29 23:06:55 -04:00
wmayer
58f72ccc80 Part: remove some more deprecated Py2 code 2021-04-26 11:13:22 +02:00
luz paz
e0ab0382b3 Part: remove py2 code 2021-04-25 11:29:35 +02:00
Tomas Pavlicek
a7d83b5e15 Sketcher - Add new Split Edge action 2021-04-24 14:30:35 +02:00
tomate44
2daf6a03e4 Part: Shape.ReflectLines: add 2D/3D, visibility and EdgeType options 2021-04-18 08:26:26 +02:00
wmayer
333859d618 Py: fix memory leak 2021-04-12 00:05:42 +02:00
wmayer
dbbac56185 Base: do not report C++ exception when converting it to Python exception
See https://forum.freecadweb.org/viewtopic.php?f=23&t=56464
2021-04-11 14:54:11 +02:00
wmayer
14e3c91158 Py: fix memory leak 2021-04-09 16:59:33 +02:00
donovaly
c3264a7cfa [Part] [skip ci] add a word in description
since we have now 3 angles for cylinders, make clear the angle property is for the rotation
2021-04-06 11:39:51 +02:00
donovaly
1f0e0f3e21 [Part] add direction to cylinder primitive
We already have the possibility to create skewed prisms. I recently stumbled upon that I would need this feature for cylinders too.

This PR takes the existing prism extrude direction feature and use it for cylinders too
2021-04-05 13:59:03 +02:00
wmayer
2b09a3ebec Part: for Prism feature use PrismExtension 2021-04-05 13:25:19 +02:00
wmayer
fd7d4c91e8 Part: implement Prism as extension 2021-04-05 13:05:59 +02:00
flachyjoe
3b089ee761 format TopoShapeWirePy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
0b8c738920 format TopoShapeSolidPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
8c1f3d16af format TopoShapeShellPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
f167fb1765 format TopoShapeEdgePy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
88c60f127b format TopoShapeCompoundPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
c97c77ba1d format TopoShapeCompSolidPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
79e3cc18b2 format TopoShapeFacePy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
a9d99cbd3c fix some missed lines 2021-03-28 15:36:36 +02:00
flachyjoe
5389eeccb3 Improve Part.Shape methods documentation
Formats UserDocu to follow the template:
 Description
 method(args) -> return
 --
 More infos
2021-03-28 15:36:36 +02:00
luz paz
1a40cdfd43 fix source comment typos [skip ci]
Found via  codespell v2.1.dev0
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,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,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,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-03-28 10:57:24 +02:00
Abdullah Tahiri
5ea99f4786 Part: Geometry - Add function to trim a B-Spline
================================================

Supports both non-periodic and periodic case
2021-03-21 06:56:23 +01: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
wmayer
b86deada1c Part: [skip ci] implement makeShellFromWires 2021-03-16 16:01:43 +01:00
tomate44
f5de466ae5 Part: fixes and check input values for spiral and helix primitives 2021-03-10 14:24:01 +01:00
tomate44
8334a59c4b Part primitives: add SegmentLength property to helix and spiral 2021-03-10 14:23:16 +01:00
tomate44
1ad246bdad Part primitives: use makeSpiralHelix in spiral and helix primitives 2021-03-10 14:22:04 +01:00
tomate44
8a7a5b583f TopoShape: add a common function to build spirals and helixes 2021-03-10 14:18:12 +01:00
Benjamin Nauck
8a2cfc268e [Base] Remove includes to StdStlTools.h as that's not needed anymore
std::make_unique was introduced in c++14, so no need to use the back
ported version
2021-03-06 21:20:32 +01:00
Benjamin Nauck
0032f4e298 [Path] Switch from boost::tuple to std::tuple
It's better to use the standard lib when possible
2021-03-06 19:31:06 +01:00
wmayer
9add6e2c9a Revert "[PartDesign] Add Material property to Body"
This reverts commit 92db97a26dbdd5c2210df39dd08a716faf6102f6.

There is no need to make this a static property because it can be added at runtime via Python or the GUI
2021-03-04 18:50:57 +01:00
howetuft
6061b8fa8b [PartDesign] Add Material property to Body 2021-03-04 12:19:50 +01:00
Abdullah Tahiri
6d0c845208 Part: Geometry - BSpline - fix weight assignment
================================================

If during assignment of weights (during the for loop iteratively setting the poles) all weights
become (temporarily) equal even though weights does not have equal values
OCCT will convert all the weights (the already assigned and those not yet assigned)
to 1.0 (nonrational b-splines have 1.0 weights). This may lead to the assignment of wrong
of weight values.

The work-around is to temporarily set the last weight to be assigned to a value different from
the current value and the to-be-assigned value for the weight at position last-to-be-assign but one.

Fixes:
https://forum.freecadweb.org/viewtopic.php?p=478701#p478702
2021-02-18 17:28:38 +01:00
David Osterberg
29cd1049bb Part: Allow helix primitive with negative Angle 2021-02-14 11:53:34 +01:00
Chris Hennes
5f80300de6 LGTM: Remove superfluous conditional 2021-02-08 16:39:40 +01:00
David Osterberg
cb2da22e86 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
d65937d338 Part: [skip ci] rename methods in TopoShape that override non-virtual functions of base class 2021-02-03 16:10:38 +01:00
wmayer
d3e4da9f51 Part: offer all supported STEP schemes by OCC in a combo box 2021-02-02 21:51:11 +01:00
vosk
1300c630f4 [Part] - Fix memory leaks 2021-01-28 15:45:00 +01:00
marioalexis
b263c2aa87 Part: Crash when calling SubShapes of empty shape from Python 2021-01-18 19:47:35 +01:00
Abdullah Tahiri
024283e704 Part: Geometry trigger notifyAttach on extension addition 2021-01-09 20:08:05 +01:00
Abdullah Tahiri
b69b3c71c0 Part/Sketcher: Refactor Geometry Extensions copy/save/restore AND attachment notification
=========================================================================================

- Long overdue refactor to avoid repetition during save/restore and copy.
- New interface to notify an extension when it is attached. It also enables the extension to gain
a pointer to the geometry container. This is intended to extend the functionality already existing
in Part::Geometry.
2021-01-09 20:08:05 +01:00
Zheng, Lei
dc57a3df59 Part/Sketcher: improve list property update efficiency 2021-01-07 10:27:21 +01:00
wmayer
f636dfc623 Part: [skip ci] in TopoShape::getMemSize() handle edges or faces with no attached geometry 2021-01-06 15:39:25 +01:00