Commit Graph

161 Commits

Author SHA1 Message Date
Yorik van Havre
49c71cb0b3 Merge branch 'master' into alafr-arch-structure 2021-03-26 11:08:01 +01:00
marioalexis
8e080f1dac Draft: Some fixes in upgrade function. bug #0004460, fixes #0004462, #0004080 2020-11-24 22:08:06 -03:00
alafr
c1cf0c0f8b 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
318312be75 Draft: Fix logical error in is_line function 2020-10-22 17:14:46 +02:00
marioalexis
aa88f3ded0 Improve make_sketch and geometric related functions 2020-10-19 13:15:14 +02:00
vocx-fc
9271c9f84b Draft: clean up the order of the submodules in DraftGeomUtils
Import the modules inside `DraftGeomUtils.py` in increasing order
of complexity. For example, the basic module is `general`,
and `geometry`, `edges`, `faces`, `arcs`, and `cuboids`
after it.

On the other hand the `circles_apollonius` module requires
various of those dependencies, so we import it at the end.

We don't import any of the `circles_incomplete` functions
because these are incomplete and we need to implement
the dependency functions first.
2020-06-09 11:51:17 +02:00
vocx-fc
7597dd0564 Draft: move more functions to draftgeoutils.general 2020-06-05 13:15:31 +02:00
vocx-fc
3bdd1310b3 Draft: move functions to draftgeoutils.circles_incomplete 2020-06-05 13:15:31 +02:00
vocx-fc
3476c73b3b Draft: move functions to draftgeoutils.circle_inversion 2020-06-05 13:15:31 +02:00
vocx-fc
0ba43a993e Draft: move functions to draftgeoutils.circles_apollonius 2020-06-05 13:15:31 +02:00
vocx-fc
627e665c5d Draft: move more functions to draftgeoutils.circles, part 2 2020-06-05 13:15:31 +02:00
vocx-fc
6ec6fb2ca1 Draft: move functions to draftgeoutils.circles, part 1 2020-06-05 13:15:31 +02:00
vocx-fc
7eee6ae4f6 Draft: move more functions to draftgeoutils.arcs 2020-06-05 13:15:31 +02:00
vocx-fc
54e9ad9d41 Draft: move functions to draftgeoutils.cuboids 2020-06-03 15:22:09 +02:00
vocx-fc
7791ebe897 Draft: move more functions to draftgeoutils.faces 2020-06-03 15:22:09 +02:00
vocx-fc
f740fde964 Draft: move more functions to draftgeoutils.intersections 2020-06-03 15:22:09 +02:00
vocx-fc
7b3052fd76 Draft: move more functions to draftgeoutils.geometry 2020-06-03 15:22:09 +02:00
vocx-fc
85321f28da Draft: move more functions to draftgeoutils.wires 2020-06-03 15:22:09 +02:00
vocx-fc
66bc105979 Draft: move more functions to draftgeoutils.edges 2020-06-03 15:22:09 +02:00
vocx-fc
b77d477476 Draft: move more functions to draftgeoutils.general 2020-06-03 15:22:09 +02:00
vocx-fc
ce0a4db598 Draft: move functions to draftgeoutils.linear_algebra 2020-05-29 13:31:28 +02:00
vocx-fc
7a764fb672 Draft: move functions to draftgeoutils.offsets 2020-05-29 13:31:28 +02:00
vocx-fc
65bd869b27 Draft: move functions to draftgeoutils.fillets 2020-05-29 13:31:28 +02:00
vocx-fc
0e862cfa9d Draft: move functions to draftgeoutils.arcs 2020-05-29 13:31:28 +02:00
vocx-fc
e7b586ead1 Draft: move functions to draftgeoutils.wires 2020-05-29 13:31:28 +02:00
vocx-fc
035a63c68b Draft: move functions to draftgeoutils.geometry 2020-05-25 13:35:34 +02:00
vocx-fc
339be2f4bb Draft: move functions to draftgeoutils.faces 2020-05-25 13:35:34 +02:00
vocx-fc
63800d7aac Draft: move functions to draftgeoutils.sort_edges 2020-05-25 13:35:34 +02:00
vocx-fc
632b72e7cd Draft: move functions to draftgeoutils.intersections 2020-05-25 13:35:34 +02:00
vocx-fc
c995ce562c Draft: move functions to draftgeoutils.edges 2020-05-25 13:35:34 +02:00
vocx-fc
add48977f9 Draft: move general functions to draftgeoutils.general
New package for organizing the geometrical utility functions of
the workbench, `draftgeoutils`.

The first submodule is one that deals with general operations.
2020-05-25 13:35:34 +02:00
wandererfan
ff323ebdb5 [Draft]Additional modes for PathArray 2020-05-23 11:22:14 -04:00
Yorik van Havre
a82f16598f Draft: Small bugfix in DraftGeomUtils.getNormal 2020-04-29 11:43:00 +02:00
Yorik van Havre
e42a26fba1 Arch: [WIP] Curtain Wall tool 2020-04-29 11:43:00 +02:00
luz.paz
9489776462 LGTM: Fix 'testing equality to None'
Testing whether an object is `None` using the `==` operator is inefficient and potentially incorrect.
2020-04-22 12:18:33 +02:00
Yorik van Havre
66c362a8b4 Draft: Fixed div by zero error in snapping 2020-04-14 16:01:29 +02:00
wandererfan
ba7b32e6bc [Draft]support BSplineCurve in getNormal 2020-04-10 12:52:52 -04:00
vocx-fc
cf7b774e92 Draft: DraftGeomUtils clean up docstrings and spaces 2020-04-07 18:12:06 +02:00
vocx-fc
b532c74e3d Draft: DraftGeomUtils clean up imports, and Python 2 compatibility
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.

Also fix copying of a list in order to keep compatibility
with Python 2.
2020-04-07 18:12:06 +02:00
luz.paz
b3e42d103d [skip ci] fix follow-up typos 2020-03-06 14:50:35 +01:00
luz.paz
180805c55e Fix typos
Found via  
```
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-03-06 14:50:35 +01:00
paullee0
97c40204a4 [ArchWall, DraftGeomUtils] fix bug: ArchWall with Offset Attribute set and based on Sketch fails at some cases
DraftGeomUtils.offsetWire() supports ArchWall Offset setting inherently now.

Discussion:
https://forum.freecadweb.org/viewtopic.php?f=23&t=42933
2020-02-10 11:19:47 +01:00
paullee0
885046b1c6 [DraftGeomUtils] OffsetWire() to accept input as Face as previously did.
Forum Discussion -
https://forum.freecadweb.org/viewtopic.php?f=23&t=42282&p=359233#p359233
2020-01-10 10:08:00 +01:00
paullee0
5ea31c6b3e [ DraftGeomUtils ] - Fix Indent as commented on Github 2020-01-08 15:22:54 +01:00
paullee0
145f44377b [DraftGeomUtils] - Add per edge Align support
Per edge align feature
- OffsetWire() function is per-edge-aware of aligns information (alignList) for offsettg individual edge
- Instead of using dvec which universally offseting all edge consistently, it calculate vector per edge for offseting
- 2 modes of 'offsetting' to get 2 'offseted' wires from a basewire taking into per-each align info

It accept a normal info to make e.g. all wires in a Sketch gain consistent direction, instead of calculating from indiviual wires
2020-01-08 15:22:54 +01:00
paullee0
cb1fb09d26 [DraftGeomUtils] isReallyClosed(): Add back support to test if wire is Circle / Ellipse 2020-01-07 07:16:41 -03:00
luz.paz
ae7cb9e300 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
luz.paz
bec8e1befd Draft: use string operator instead of numeric LGTM fix 2019-10-25 10:25:31 -03:00
luz.paz
1c981e8f14 Fix typos and misc. formatting [skip ci]
Found via `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,currenty,dof,doubleclick,dum,eiter,elemente,feld,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`
2019-10-21 16:02:23 -03:00
Yorik van Havre
c6b79dd23f Removed tabs 2019-10-21 15:58:44 -03:00