BIM: Fix human figure

Fixes #25084.

Instead of a brep file a point list is now used to generate the figure.

Additionally:
Two points have been added to make the head of the figure less 'pointy'.

It would make sense to move the `get_human_figure` function to a different file in the future.

With 1.7m the figure is not very tall BTW.
This commit is contained in:
Roy-043
2025-11-09 16:47:57 +01:00
parent fb6bafaa62
commit 2d2cf02e48
4 changed files with 9 additions and 1601 deletions

View File

@@ -28,12 +28,12 @@ import os
txt = "<RCC>\n <qresource>\n"
cdir = os.path.dirname(__file__)
for subdir in ["geometry", "icons", "icons/IFC", "translations", "ui"]:
for subdir in ["icons", "icons/IFC", "translations", "ui"]:
subpath = os.path.join(cdir, subdir)
for f in sorted(os.listdir(subpath)):
if f not in ["Arch.ts", "BIM.ts", "IFC"]:
ext = os.path.splitext(f)[1]
if ext.lower() in [".qm", ".svg", ".ui", ".png", ".brep"]:
if ext.lower() in [".qm", ".svg", ".ui", ".png"]:
txt += " <file>" + subdir + "/" + f + "</file>\n"
txt += " </qresource>\n</RCC>\n"
with open(os.path.join(cdir, "Arch.qrc"), "w") as resfile:

File diff suppressed because one or more lines are too long

View File

@@ -205,13 +205,14 @@ class BIM_ProjectManager:
elif self.form.radioNative3.isChecked():
self.project = ifc_tools.convert_document(doc, silent=True)
# human
# Human
human = None
if self.form.addHumanFigure.isChecked():
humanshape = Part.Shape()
humanshape.importBrep(":/geometry/HumanFigure.brep")
from draftguitools import gui_trackers
pts = gui_trackers.gridTracker.get_human_figure(None)
human = FreeCAD.ActiveDocument.addObject("Part::Feature", "Human")
human.Shape = humanshape
human.Shape = Part.makePolygon(pts)
human.Placement.move(FreeCAD.Vector(500, 500, 0))
# Site creation or edition

View File

@@ -1399,7 +1399,9 @@ class gridTracker(Tracker):
Vector(337.9, 0.0, 1570.3),
Vector(332.8, 0.0, 1624.7),
Vector(322.2, 0.0, 1666.9),
Vector(272.6, 0.0, 1697.4),
Vector(216.2, 0.0, 1680.2),
Vector(178.1, 0.0, 1625.8),
Vector(163.5, 0.0, 1559.1),
Vector(179.8, 0.0, 1475.5),
Vector(195.6, 0.0, 1459.9),