Skip to content

Commit 18e3bc8

Browse files
committed
Update Horizontal and Vertical
#21 Code not valid it's just a patch but if the plan is particular it doesn't work To be reviewed
1 parent 247a387 commit 18e3bc8

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Doc/Plaque.FCStd

8.12 KB
Binary file not shown.

GDT.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -737,12 +737,23 @@ def plotStrings(self, fp, points):
737737
distance = (v.y)/2
738738
else:
739739
distance = (v.z)/2
740-
741-
centerPoint = points[-2] + Horizontal * (distance)
742-
# print("Datum Feature Vertical {}".format(Vertical))
740+
741+
"""
742+
print("Datum Feature Label {}".format(str(fp.DF.Label)))
743+
print("Datum Feature Vertical {}".format(Vertical))
744+
print("Datum Feature Horizontal {}".format(Horizontal))
745+
"""
743746
# Modif 5@xes https://github.com/5axes/FreeCAD-GDT/issues/21
744747
# Must be tested on different Case
748+
# Code not valid it's just a patch but if the plan is particular it doesn't work
749+
# To be reviewed
745750
Epsilon = 1E-10
751+
vectCor = FreeCAD.Vector(0,distance/2,distance/2)
752+
if Horizontal.y > Epsilon :
753+
centerPoint = points[-2] + vectCor
754+
else :
755+
centerPoint = points[-2] + Horizontal * (distance)
756+
746757
if Vertical.z < -Epsilon :
747758
centerPoint = centerPoint + Vertical * (sizeOfLine*1.5)
748759
else :

0 commit comments

Comments
 (0)