Commit Graph

82 Commits

Author SHA1 Message Date
Abdullah Tahiri
284c4d93f7 Sketcher: Extend SketchObject Python Interface to get/set SketchGeometryExtension GeometryId (convenience interface) 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
0fd808dfc1 Sketcher: Geometry Facade interface for Geometry and SketchGeometryExtension 2020-11-03 12:01:22 +01:00
wmayer
4a8201a237 Sketch: [skip ci] handle possible crashes when decreasing degree of a spline 2020-10-23 11:26:15 +02:00
wmayer
fc89f4eb0c Sketcher: implement command to decrease degree of a B-spline 2020-10-23 00:36:41 +02:00
mwganson
2bfc6301bc [Sketcher] add python command sketch.getGeoVertexIndex(int index) -- returns tuple (geoId, posId) of vertex at that index in the sketch. usage example: (geoId, posId) = App.ActiveDocument.Sketch.getGeoVertexIndex(int(Gui.Selection.getSelectionEx()[0].SubElementNames[0][6:])-1) 2020-07-19 05:50:12 +02:00
luz.paz
b2ffebf1c0 Sketcher: [skip ci] fix header uniformity
This PR fixes header uniformity across all Sketcher WB files
2019-12-22 01:00:29 +01:00
wmayer
5fd5db9aed add method to sketch object to get index by user-defined name 2019-10-29 19:35:53 +01:00
Abdullah Tahiri
f45d0e54c0 Sketcher: Python interface to SketchObject constraint state 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
95788dde71 Sketcher: PCH 2019-05-02 07:12:27 +02:00
Abdullah Tahiri
c88a64e8e7 Make Open vertices detection routine accesible to Python 2018-12-03 12:11:11 +01:00
luz.paz
4dc201e086 Misc. typo, grammar, and whitespace fixes
[skip ci]
2018-11-27 15:02:58 -03:00
wmayer
c1f19d3854 remove trailing spaces 2018-11-05 10:53:01 +01:00
Abdullah Tahiri
fe78c1a037 Sketcher: Expose mass datum commands to python 2018-11-04 14:41:20 -03:00
Abdullah Tahiri
044e0f6c20 Sketcher: Use transparent exception mechanism for fillets
=========================================================

This ensures that the exception back in the c++ that invoked python retains the type of exception and can be properly catched.
2018-10-28 18:34:50 +01:00
Abdullah Tahiri
f41c1a9696 Sketcher: Python SketchObject support 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
cd5aa8975e Sketcher: Python command to delete all the constraints at once 2018-07-29 13:44:07 +02:00
Abdullah Tahiri
0024d1b0c4 Sketcher: Python SketchObject implementation
Exposure of all the functionality in the previous commits to Python
2018-07-29 13:44:07 +02:00
Abdullah Tahiri
d6d26b6a89 Sketcher: Wrong DoF reported - Fixes #3503 2018-06-09 11:11:46 +02:00
Abdullah Tahiri
a5e85fd297 Sketcher: Python interface to solveraid 2018-06-09 11:02:53 +02:00
Abdullah Tahiri
bf03c7bcb1 Sketcher: Empty list means all geometry for Python addCopy addRectangularArray and addMove 2018-05-31 14:36:21 +02:00
Abdullah Tahiri
cffa76b0cc Sketcher: Python support for moving Geometry 2018-05-31 14:34:58 +02:00
Abdullah Tahiri
31189b6c20 Sketcher: Python Interface for Constraint Virtual Space
=======================================================

set/get/toggle python interface to enable to set the virtual space status of a constraint via SketchObject.
2018-01-26 17:02:46 +01:00
wmayer
348e666fdc improve whitespaces 2018-01-13 14:07:15 +01:00
Abdullah Tahiri
0dd0eab0d0 Sketcher: Overload delConstraintonPoint Python to allow deletion on GeoId and Pos 2018-01-13 13:55:56 +01:00
Abdullah Tahiri
3aec9b3859 Sketcher: Python command to delete all internal geometry and constraints of an sketch 2017-11-06 14:18:12 +01:00
wmayer
6e1a6d8310 fix bug in pr774, improve whitespaces 2017-06-19 13:32:27 +02:00
Alexander Lin
c51d0b4e16 Adds extend feature to Mod/Sketcher
Fixes #1187
2017-06-19 13:07:37 +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
Abdullah Tahiri
b9ffb09a22 Sketcher: Carbon copy Python command 2017-04-10 08:57:25 +02:00
Abdullah Tahiri
bc4ae73861 Sketcher: SketchObject - Python command to increase knot multiplicity 2017-04-08 12:58:06 +02:00
Kunda
99c99006b8 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
wmayer
bcde3cd5a3 py3: ported Skechter to python3 2017-03-01 17:20:20 +01:00
wmayer
f2dc8c5d31 Some fixes of pr 538
fix -Wreturn-type
homogenous naming style
use official spelling of B-spline
2017-02-21 13:30:43 +01:00
Abdullah Tahiri
55f373eef7 Sketcher: IncreaseBSplineDegree python implementation 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
4abe462a41 Sketcher: ConverttoNURBS python implementation 2017-02-21 13:24:10 +01:00
wmayer
0955ccf594 fix whitespaces 2017-01-20 19:22:50 +01:00
Abdullah Tahiri
36a5d5f9b6 Sketcher: Enable BSpline creation in SketchObjectPy 2017-01-05 21:52:35 +01:00
Abdullah Tahiri
9e528420f8 Sketcher: Enable Parabola creation in SketchObjectPy 2016-12-18 00:46:01 +01:00
Abdullah Tahiri
590e3fbec6 Sketcher: New Feature: Hyperbola/ArcOfHyperbola
===============================================

- ArcOfHyperbola creation method
- Solver representation (undefined moving)
- SketchObjectPyImp (here we still miss the Part->Partdesign conversion)
- Sketch validation for hyperbola
- Hyperbola creation method: shows the "proof of concept", but it is very buggy!!

Notes:
- Missing icons, probably missing geo normal curve implementation - rebasing -
- Fixes to adapt Hyperbola to Derivector implementation and make it compile
2016-11-27 18:45:33 +01: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
jrheinlaender
37a8c02bc6 Improved SketchObject error reporting 2016-04-12 18:11:55 +02:00
jrheinlaender
02ce7395aa Centralize the check for valid external geometry to ensure consistency (part 2) 2016-04-12 18:11:55 +02:00
jrheinlaender
9e7b463113 Allow geometry from other bodies in the same par as external geometry for sketches 2016-04-12 18:11:52 +02:00
jrheinlaender
5b3d5e6bd8 Moved generic Datum class to Part module to avoid Sketcher dependency on PartDesign 2016-04-12 18:11:49 +02:00
wmayer
b25ef6235d + on rename of contraint make sure that new name is different, on swap constraint names make sure they have user-defined names 2016-03-12 20:02:18 +01:00
Abdullah Tahiri
e1dd86f0a9 Sketcher: Bug fix: unable to move geometry after addition of a constraint
=========================================================================

This fixes issue:
http://www.freecadweb.org/tracker/view.php?id=2281

Discussed in:
http://forum.freecadweb.org/viewtopic.php?p=101910#p101910

How to reproduce?
With Auto-Update mode unchecked, execute the sequence in the bug tracker. You will reach to a geometry assembly successfully solved that can not be moved.

Why?
The coincident constraint is partially redundant within the meaning of redundancy of the solver.
The solve within "addconstraint" in SketchObjectPy.cpp causes the geometry to move to meet the coincident constraint.
At the end of the solve, the initial solution used in diagnostics is no longer valid (the geometry moved). This causes a subsequente move not to be executed.

The Solution:
Recalculate just the initial solution after the addition.
2015-10-23 00:13:20 +02:00
wmayer
10786c65b8 + support of unicode names for sketch constraints 2015-09-24 03:17:47 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Eivind Kvedalen
67800ec8c4 Sketcher: Added support for expressions. 2015-09-21 14:51:10 +02:00
wmayer
3807cbdb23 + improve whitespaces 2015-08-31 13:53:48 +02:00