Commit Graph

91 Commits

Author SHA1 Message Date
Roy-043
062b7d4c94 Draft: FIx issue with get_shape_normal
Forum topic: https://forum.freecad.org/viewtopic.php?t=86817
2024-04-16 15:04:49 +02:00
paul
f29131bbae [ArchWall] getExtrusionData() fix normal problem by adding get_shape_normal() (#12603)
* [ArchWall] getExtrusionData() fix normal problem by adding get_shape_normal()

In geometry.py
- added get_shape_normal()
- fixed is_straight_line()
DraftGeomUtils.py
- added get_shape_normal()

FC Discussion - https://forum.freecad.org/viewtopic.php?p=726101#p726101

* [ArchWall] getExtrusionData() fix normal problem

Follow-up following discussion at https://github.com/FreeCAD/FreeCAD/pull/12603

- delete trailing whitespaces
- put Part.makePolygon() in try statement
- study and findings at https://github.com/FreeCAD/FreeCAD/pull/12603#issuecomment-1969277743

In geometry.py
- added get_shape_normal()
- fixed is_straight_line()
DraftGeomUtils.py
- added get_shape_normal()

FC Discussion - https://forum.freecad.org/viewtopic.php?p=726101#p726101

* Update geometry.py

* Update geometry.py

* Update geometry.py

---------

Co-authored-by: Yorik van Havre <yorik@uncreated.net>
2024-04-02 11:54:27 +02:00
JULIEN MASNADA
2fb74cac0f Fixed invalid vector in distance calculation (#12364)
* Fixed invalid vector in distance calculation
2024-02-13 10:11:22 -06:00
Kevin Martin
2b9fa18b68 Eliminate many "doing what you told me to" messages
These messages were perhaps originally intended as a debuggin aid but now add clutter to the output panes. Remaining messges are mostly the result of methods to display attributes of an object (which one could call from the Python console) or actually provide some information which would not be obvious from the circumstances
2024-02-02 08:58:45 -05:00
Roy-043
06a321eb80 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
59753260c9 Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
7a05e9809b Draft: minor updates related to precision pref 2023-11-17 09:49:01 +01:00
Roy-043
f47714cae7 Fix syntax error in wires.py 2023-10-23 19:33:06 +02:00
Roy-043
d065f13f67 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
8032698676 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
9fde9f53fa Draft: Fix Draft_Mirror preview 2023-08-29 16:25:42 +02:00
Roy-043
1ed3782d4b Draft: Fix placement_from_face if vec_z matches normal of face (#10333) 2023-08-24 09:53:13 +02:00
Roy-043
bfa8d79afb 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
649dde9808 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
38a01939e0 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
0e1530be59 Draft: linting bad indentations, superflous markup (#9313) 2023-04-19 09:48:57 +02:00
luzpaz
a4239ccfcf Draft: fix trailing whitespace 2023-01-22 20:26:40 +01:00
Roy-043
8a3b45ca73 Draft: improve wires.isReallyClosed (#8167) 2023-01-12 10:25:48 +01:00
Roy-043
0e517b0e19 Draft: improve offsets.offsetWire (#8166) 2023-01-12 10:25:11 +01:00
Roy-043
cf6a36fd59 Draft: fix make_sketch bugs (#7969) 2022-12-15 10:10:24 +01:00
Roy-043
27da9e8e59 Draft: fix arcFromSpline midpoint bug 2022-11-17 11:04:25 +01:00
Roy-043
8f833a68e8 Draft: Fix rectangle with face offset bug 2022-10-30 16:10:04 +01:00
Roy-043
b280f2fb9e Draft: fix rectangle with face offset bug 2022-10-30 12:49:28 +01:00
Yorik van Havre
2e4bbd6afe 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
59bd8847d1 Draft: Fix flatten wire 2022-09-04 09:45:39 +02:00
Roy-043
38bccb31fa 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
6455df6a9b Draft: add tolerance to boundbox check in intersections.py 2022-08-11 17:50:43 +02:00
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