Commit Graph

87 Commits

Author SHA1 Message Date
Roy-043
5f07c7aacd Draft: intermediate fix for get_normal: check if 3D view exists
This avoids issues with TechDraw views of Arch models if there is no active 3D view.
2023-12-16 20:30:45 +01:00
Roy-043
56d73f39ac Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
e9e4554c06 Draft: minor updates related to precision pref 2023-11-17 09:49:01 +01:00
Roy-043
c558ae7484 Fix syntax error in wires.py 2023-10-23 19:33:06 +02:00
Roy-043
ca06e87a38 Draft: Updates related to the PlaneGui class (step 2)
Related issue:
#5603.

Additionally:
Fixed the issue where the texts of Arch_Space objects were not exported to DXF.
2023-10-23 16:25:12 +02: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
53a4fb14c3 Draft: Fix placement_from_face if vec_z matches normal of face (#10333) 2023-08-24 09:53:13 +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
luzpaz
78bdc34996 Draft: linting bad indentations, superflous markup (#9313) 2023-04-19 09:48:57 +02:00
luzpaz
5fa4482504 Draft: fix trailing whitespace 2023-01-22 20:26:40 +01:00
Roy-043
69efdc016f Draft: improve wires.isReallyClosed (#8167) 2023-01-12 10:25:48 +01:00
Roy-043
fb1ed8f5e4 Draft: improve offsets.offsetWire (#8166) 2023-01-12 10:25:11 +01:00
Roy-043
8da2f363b8 Draft: fix make_sketch bugs (#7969) 2022-12-15 10:10:24 +01:00
Roy-043
91319b21d9 Draft: fix arcFromSpline midpoint bug 2022-11-17 11:04:25 +01:00
Roy-043
b15da84454 Draft: Fix rectangle with face offset bug 2022-10-30 16:10:04 +01:00
Roy-043
c9233ecdce Draft: fix rectangle with face offset bug 2022-10-30 12:49:28 +01:00
Yorik van Havre
460f33a1be Merge pull request #7441 from Roy-043/Draft-Fix-flatten-wire
Draft: Fix flatten wire
2022-09-05 11:22:49 +02:00
Roy-043
39c2ff4e45 Draft: Fix flatten wire 2022-09-04 09:45:39 +02:00
Roy-043
8aaa36a013 Arch: Fix baseface generation for walls with a trace that self-intersects, has T-connections or that overlaps 2022-09-03 09:06:51 +02:00
Roy-043
eb6b3f35ed Draft: add tolerance to boundbox check in intersections.py 2022-08-11 17:50:43 +02:00
Roy
455adec471 Fixed an error in the connect function. Point v2 could be undefined. 2022-02-09 22:06:36 +01:00
Roy-043
c236649595 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
24bfc4f0a2 Draft: Fix Part_Line offset issue 2021-12-10 02:40:16 +01:00
Roy-043
359955a51e 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
42e8287699 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
7da42730e1 Update wires.py
typo
2021-10-15 22:18:17 +02:00
Roy-043
fa80866a0e Daft: fix cleanProjection (used by Draft_Shape2DView and DXF export) 2021-10-15 22:11:40 +02:00
Chris Hennes
c505ac1ee3 [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
68a027cf94 Draft: LGTM - don't catch BaseException 2021-09-19 14:36:38 -05:00
Yorik van Havre
c99ec69f9c Merge branch 'alafr-arch-structure' of https://github.com/alafr/FreeCAD 2021-09-02 14:36:43 +02:00
Yorik van Havre
c167955018 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
6e7bea99d0 Merge branch 'master' into alafr-arch-structure 2021-08-06 21:55:02 +02:00
Roy-043
ed94be6ab9 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
8d5544ee3c Draft: disconsider unknown edge types in geo utils 2021-07-07 15:43:55 +02:00
Roy-043
32953590df 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
df5c24bc63 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
a6ef3e656b Draft: Check null shape in geometry.py functions 2021-06-06 21:30:20 -03:00
Yorik van Havre
49c71cb0b3 Merge branch 'master' into alafr-arch-structure 2021-03-26 11:08:01 +01:00
Amritpal Singh
d9e7ee46e6 Draft: Fix bug in getCubicDimensions function 2021-02-04 22:57:31 +05:30
luz paz
ccbc13ee82 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
8e080f1dac Draft: Some fixes in upgrade function. bug #0004460, fixes #0004462, #0004080 2020-11-24 22:08:06 -03:00
alafr
d4b65cffff 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
8a17342b69 DraftGeomUtils: formatting
Restore a change from commit #add4897 that i accidentally deleted during conflict resolution
2020-10-31 14:17:16 +01:00
alafr
afd644fd72 DraftGeomUtils: import FreeCAD as App 2020-10-31 14:17:13 +01:00
alafr
d310986cd8 Fix missing import 2020-10-31 14:17:10 +01:00
alafr
942b4748fc DraftGeomUtils: Doctstring formatting
Adress vocx-fc's review
2020-10-31 14:17:07 +01: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