Merge pull request #25186 from Roy-043/BIM-fix-human-figure

BIM: Fix human figure
This commit is contained in:
Chris Hennes
2025-11-09 16:36:52 -06:00
committed by GitHub
5 changed files with 9 additions and 1602 deletions

View File

@@ -1,6 +1,5 @@
<RCC>
<qresource>
<file>geometry/HumanFigure.brep</file>
<file>icons/Arch_3Views.svg</file>
<file>icons/Arch_Add.svg</file>
<file>icons/Arch_Axis.svg</file>

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