Commit Graph

64 Commits

Author SHA1 Message Date
Roy
aa3aaaefc6 Fixed an error in the connect function. Point v2 could be undefined. 2022-02-09 22:06:36 +01:00
Roy-043
f338d2abcb Draft: fix isClosed bug in offsets.py
Use built-in isClosed() function instead of isReallyClosed which is buggy.
2022-02-04 15:03:04 +01:00
Roy
ce0563b385 Draft: Fix Part_Line offset issue 2021-12-10 02:40:16 +01:00
Roy-043
6e1874eede Draft: revise findMidpoint function
The findMidpoint function (used by Draft_Snap_Midpoint) only worked for straight and circular edges. With this revision the midpoint of all edges can be found.
2021-11-14 11:34:06 -06:00
luz paz
397729e33e Fix various 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-10-20 18:18:33 -04:00
Roy-043
39a67d7cbf Update wires.py
typo
2021-10-15 22:18:17 +02:00
Roy-043
1535abecc4 Daft: fix cleanProjection (used by Draft_Shape2DView and DXF export) 2021-10-15 22:11:40 +02:00
Chris Hennes
e4116758c5 [Draft] Silence LGTM warnings about unused vars
LGTM only recognizes "_" and "unused" as variable names that are
expected to be unused, so switch to "_".
2021-09-26 13:34:16 -05:00
Chris Hennes
f99059e371 Draft: LGTM - don't catch BaseException 2021-09-19 14:36:38 -05:00
Yorik van Havre
db3b29b088 Merge branch 'alafr-arch-structure' of https://github.com/alafr/FreeCAD 2021-09-02 14:36:43 +02:00
Yorik van Havre
785a5023c4 Merge pull request #4885 from Roy-043/Draft_Fix_Array_Count_Issues
Draft: Fix Draft_PointArray and Draft_TwistedArray Count problems
2021-08-17 15:19:57 +02:00
alafr
d043bf6a77 Merge branch 'master' into alafr-arch-structure 2021-08-06 21:55:02 +02:00
Roy-043
f2b7d863af Draft: fix geometry.py findDistance function
The findDistance function did not work properly for arcs that crossed the 9 o'clock point.
2021-07-31 09:56:25 +02:00
Yorik van Havre
36a73e5fa0 Draft: disconsider unknown edge types in geo utils 2021-07-07 15:43:55 +02:00
Roy-043
95428dfbe0 Draft: Fix Draft_PointArray and Draft_TwistedArray Count problems
Draft_PointArray and Draft_TwistedArray have Count problems:
1. Draft_PointArray: Count is always zero.
2. Draft_PathTwistedArray: Number of items is Count+1.
3. Draft_PathTwistedLinkArray: Count is increased whenever object is recomputed.

Also the first item in a twisted array should be unrotated.
2021-06-23 11:06:47 +02:00
Roy-043
32baf354d7 Draft: Fix offsets.py problem with direction if precision=6
The direction of the offset could be faulty if Draft precision=6. Since we are only interested in the side the pointer is on, working with a high precision does not make sense.
2021-06-15 17:37:21 +02:00
marioalexis
b5e154518f Draft: Check null shape in geometry.py functions 2021-06-06 21:30:20 -03:00
Yorik van Havre
6189aee357 Merge branch 'master' into alafr-arch-structure 2021-03-26 11:08:01 +01:00
Amritpal Singh
7d5ce50fdd Draft: Fix bug in getCubicDimensions function 2021-02-04 22:57:31 +05:30
luz paz
19d0e1123f Draft: fix LGTM 'Testing for None should use the 'is' operator' alerrts
https://lgtm.com/projects/g/FreeCAD/FreeCAD/alerts/?mode=tree&ruleFocus=7900090
2021-02-03 21:58:47 +01:00
marioalexis
a11b457121 Draft: Some fixes in upgrade function. bug #0004460, fixes #0004462, #0004080 2020-11-24 22:08:06 -03:00
alafr
5bf974a0e8 Draft: Conform to vocx-fc's review
- check for Part.Shape as it was before, to avoid any risk of breaking other tools
- change the order of Draft tests
2020-10-31 14:17:21 +01:00
alafr
6a299ac3f6 DraftGeomUtils: formatting
Restore a change from commit #97235de that i accidentally deleted during conflict resolution
2020-10-31 14:17:16 +01:00
alafr
e66ec4b659 DraftGeomUtils: import FreeCAD as App 2020-10-31 14:17:13 +01:00
alafr
163e2460b0 Fix missing import 2020-10-31 14:17:10 +01:00
alafr
3186ddd029 DraftGeomUtils: Doctstring formatting
Adress vocx-fc's review
2020-10-31 14:17:07 +01:00
alafr
bac868a298 Draft: Add geometry functions for Arch Structure
* get_referenced_edges(property_value): returns the Edges referenced by the value of a App:PropertyLink, App::PropertyLinkSub or App::PropertyLinkSubList property.
* get_placement_perpendicular_to_wire(wire): returns the placement whose base is the wire's first vertex and it's z axis aligned to the wire's tangent.
* get_extended_wire(wire, offset_start, offset_end): returns a wire trimmed (negative offset) or extended (positive offset) at its first vertex, last vertex or both ends. For example:
            get_extended_wire(wire, -100.0, 0.0) -> returns a copy of the wire with its first 100 mm removed
            get_extended_wire(wire, 0.0, 100.0) -> returns a copy of the wire extended by 100 mm after it's last vertex
2020-10-31 14:16:50 +01:00
marioalexis
1aa371a819 Draft: Fix logical error in is_line function 2020-10-22 17:14:46 +02:00
luz paz
0b27eec4e2 Fix various typos
Found via `codespell v2.0.dev`  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,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,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
```
2020-10-21 16:20:08 +02:00
Yorik van Havre
eacf3a6b98 Arch: Enabled ellipse-based walls - fixes #3859 2020-10-20 13:13:54 +02:00
marioalexis
1ad7b9788b Improve make_sketch and geometric related functions 2020-10-19 13:15:14 +02:00
vocx-fc
513c0e9eb4 Draft: new PathTwistedArray object
It takes a `Shape` and replicates it around a path, while at the
same time adding a rotation to each copy. This can be used to create
a twisted "ribcage" from a frame-like object, which can be used
in a more complicated `Shape`, for example, a tunnel or bridge
object.
2020-09-03 12:34:16 +02:00
paul lee
47420a3da4 [Draft - geotuils.offsets] Fix To Work with Sketch
Forum Discussion - https://forum.freecadweb.org/viewtopic.php?f=23&t=48852&p=419209#p419209
2020-08-11 11:10:42 +02:00
paul lee
377ef5cff7 [Draft - geoutils.offsets] Fix Circle and Arc Offset Direction
Forum Discussion - https://forum.freecadweb.org/viewtopic.php?f=23&t=48852#p418903
2020-08-11 11:10:42 +02:00
vocx-fc
44f09d6777 Draft: add modules of draftgeoutils to the proper Doxygen group
This includes `arcs`, `circle_inversion`, `circles`, `circles_apollonius`,
`circles_incomplete`, `cuboids`, `edges`, `faces`, `fillets`,
`general`, `geometry`, `intersections`, `linear_geometry`,
`offsets`, `sort_edges`, `wires`.

These are added to the `draftgeoutils` Doxygen group so that
the functions contained in each module are listed appropriately
in the automatically generated documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
1c65c7dc92 Draft: add Doxygen strings to the packages' __init__ files
The packages are `draftfunctions`, `draftgeoutils`, `draftguitools`,
`draftmake`, `draftobjects`, `drafttaskpanels`, `drafttests`,
`draftutils`, `draftviewproviders`.
2020-07-17 13:01:45 +02:00
paul lee
999c3d8bf4 [ArchWall] ArchWall Offset should now works with Base as Sketch 2020-06-24 11:29:07 +02:00
luz.paz
29cba68da9 Fix typos [skip ci]
Found via codespell v1.18.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,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,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
```
2020-06-15 10:11:22 +02:00
vocx-fc
ba4fce2b9e Draft: clean up draftgeoutil modules 2020-06-09 11:51:17 +02:00
vocx-fc
aba904f1e2 Draft: move more functions to draftgeoutils.general 2020-06-05 13:15:31 +02:00
vocx-fc
0e82ae26cd Draft: move functions to draftgeoutils.circles_incomplete 2020-06-05 13:15:31 +02:00
vocx-fc
4dc6b975db Draft: move functions to draftgeoutils.circle_inversion 2020-06-05 13:15:31 +02:00
vocx-fc
1ea5b19ea4 Draft: move functions to draftgeoutils.circles_apollonius 2020-06-05 13:15:31 +02:00
vocx-fc
7f9e6ba16b Draft: move more functions to draftgeoutils.circles, part 2 2020-06-05 13:15:31 +02:00
vocx-fc
4c4531a5fd Draft: move functions to draftgeoutils.circles, part 1 2020-06-05 13:15:31 +02:00
vocx-fc
b6adbe98e4 Draft: move more functions to draftgeoutils.arcs 2020-06-05 13:15:31 +02:00
vocx-fc
c6bac1e58e Draft: move functions to draftgeoutils.cuboids 2020-06-03 15:22:09 +02:00
vocx-fc
3a572d50ca Draft: move more functions to draftgeoutils.faces 2020-06-03 15:22:09 +02:00
vocx-fc
5e25517c37 Draft: move more functions to draftgeoutils.intersections 2020-06-03 15:22:09 +02:00
vocx-fc
ae9850175a Draft: move more functions to draftgeoutils.geometry 2020-06-03 15:22:09 +02:00