Commit Graph

167 Commits

Author SHA1 Message Date
Roy-043
56d73f39ac Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
68276d20ad Draft: Add distance_to_plane and project_point_on_plane to geometry.py
The functions have been copied from the WorkingPlane class. It makes sense to also have them available outside that class. The WorkingPlane class will later be updated to use these functions so that duplicate code is avoided.

Note that the default tolerance of the project_point_on_plane function is 1e-7. In the original projectPoint function it is sys.float_info.epsilon (too small for FreeCAD IMO).
2023-09-19 16:02:59 +02:00
Roy-043
a205ee549f Draft: Fix Draft_Mirror preview 2023-08-29 16:25:42 +02:00
Roy-043
29339d7197 Draft: Add placement_from_face to geometry.py (#10327)
Changed getPlacementFromFace function in WorkingPlane.py to a compatibility function that calls placement_from_face.
2023-08-23 12:05:34 +02:00
Roy-043
5c4d8730d9 Draft: Add placement_from_points to geometry.py
Changed getPlacementFromPoints function in WorkingPlane.py to a compatibility function that calls placement_from_points.
2023-08-23 11:17:17 +02:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
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