Bim project manager upgrade (#17909)
* BIM: NativeIFC 2D support - basic import/export + linework annotations * BIM: NativeIFC 2D support - texts * BIM: NativeIFC 2D support - dimensions * BIM: NativeIFC 2D support - optimized export of FreeCAD dimensions * BIM: NativeIFC 2D support - section planes * BIM: NativeIFC 2D support - misc fixes cf comment #2383181661 * BIM: NativeIFC 2D support - axes * BIM: Project manager upgrade * BIM: Fixed rebase leftover
This commit is contained in:
@@ -427,10 +427,12 @@ class ViewProviderBuildingPart:
|
||||
|
||||
def __init__(self,vobj):
|
||||
|
||||
vobj.addExtension("Gui::ViewProviderGroupExtensionPython")
|
||||
vobj.Proxy = self
|
||||
self.setProperties(vobj)
|
||||
vobj.ShapeColor = ArchCommands.getDefaultColor("Helpers")
|
||||
if vobj:
|
||||
vobj.addExtension("Gui::ViewProviderGroupExtensionPython")
|
||||
vobj.Proxy = self
|
||||
self.setProperties(vobj)
|
||||
vobj.ShapeColor = ArchCommands.getDefaultColor("Helpers")
|
||||
self.Object = vobj.Object
|
||||
|
||||
def setProperties(self,vobj):
|
||||
|
||||
@@ -532,6 +534,9 @@ class ViewProviderBuildingPart:
|
||||
return ":/icons/Arch_Building_Tree.svg"
|
||||
elif self.Object.IfcType == "Annotation":
|
||||
return ":/icons/BIM_ArchView.svg"
|
||||
elif hasattr(self.Object,"IfcClass"):
|
||||
from nativeifc import ifc_viewproviders
|
||||
return ifc_viewproviders.get_icon(self)
|
||||
return ":/icons/Arch_BuildingPart_Tree.svg"
|
||||
|
||||
def attach(self,vobj):
|
||||
@@ -661,7 +666,10 @@ class ViewProviderBuildingPart:
|
||||
self.lco.point.setValues([[-fs,0,0],[fs,0,0],[0,-fs,0],[0,fs,0],[0,0,-fs],[0,0,fs]])
|
||||
elif prop in ["OverrideUnit","ShowUnit","ShowLevel","ShowLabel"]:
|
||||
if hasattr(vobj,"OverrideUnit") and hasattr(vobj,"ShowUnit") and hasattr(vobj,"ShowLevel") and hasattr(vobj,"ShowLabel") and hasattr(self,"txt"):
|
||||
z = vobj.Object.Placement.Base.z + vobj.Object.LevelOffset.Value
|
||||
offset = getattr(vobj.Object, "LevelOffset", 0)
|
||||
if hasattr(offset, "Value"):
|
||||
offset = offset.Value
|
||||
z = vobj.Object.Placement.Base.z + offset
|
||||
q = FreeCAD.Units.Quantity(z,FreeCAD.Units.Length)
|
||||
txt = ""
|
||||
if vobj.ShowLabel:
|
||||
@@ -729,7 +737,7 @@ class ViewProviderBuildingPart:
|
||||
self.clip.plane.setValue(plane)
|
||||
sg.insertChild(self.clip,0)
|
||||
else:
|
||||
if self.clip:
|
||||
if getattr(self,"clip",None):
|
||||
sg.removeChild(self.clip)
|
||||
self.clip = None
|
||||
for o in Draft.get_group_contents(vobj.Object.Group,
|
||||
|
||||
Reference in New Issue
Block a user