Arch: minor bugfixes
This commit is contained in:
parent
8a24f0fe6f
commit
3f236d042a
|
@ -282,7 +282,7 @@ def export(exportList,filename):
|
|||
uid = None
|
||||
if hasattr(obj,"IfcAttributes"):
|
||||
if "IfcUID" in obj.IfcAttributes.keys():
|
||||
uid = obj.IfcAttributes["IfcUID"]
|
||||
uid = str(obj.IfcAttributes["IfcUID"])
|
||||
if not uid:
|
||||
uid = ifcopenshell.guid.compress(uuid.uuid1().hex)
|
||||
|
||||
|
@ -317,7 +317,7 @@ def export(exportList,filename):
|
|||
|
||||
# setting the arguments
|
||||
args = [uid,history,name,description,None,placement,representation,None]
|
||||
if ifctype in ["IfcSlab","IfcFooting"]:
|
||||
if ifctype in ["IfcSlab","IfcFooting","IfcRoof"]:
|
||||
args = args + ["NOTDEFINED"]
|
||||
elif ifctype in ["IfcWindow","IfcDoor"]:
|
||||
args = args + [obj.Width.Value, obj.Height.Value]
|
||||
|
@ -576,7 +576,7 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess
|
|||
|
||||
if shapes:
|
||||
|
||||
if FreeCAD.GuiUp and not subtraction:
|
||||
if FreeCAD.GuiUp and (not subtraction) and hasattr(obj.ViewObject,"ShapeColor"):
|
||||
rgb = obj.ViewObject.ShapeColor
|
||||
col = ifcfile.createIfcColourRgb(None,rgb[0],rgb[1],rgb[2])
|
||||
ssr = ifcfile.createIfcSurfaceStyleRendering(col,None,None,None,None,None,None,None,"FLAT")
|
||||
|
|
|
@ -963,9 +963,9 @@ def makeCopy(obj,force=None,reparent=False):
|
|||
ArchWindow._ViewProviderWindow(newobj.ViewObject)
|
||||
elif (getType(obj) == "Sketch") or (force == "Sketch"):
|
||||
newobj = FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject",getRealName(obj.Name))
|
||||
for geo in obj.Geometries:
|
||||
for geo in obj.Geometry:
|
||||
newobj.addGeometry(geo)
|
||||
for con in obj.constraints:
|
||||
for con in obj.Constraints:
|
||||
newobj.addConstraint(con)
|
||||
elif obj.isDerivedFrom("Part::Feature"):
|
||||
newobj = FreeCAD.ActiveDocument.addObject("Part::Feature",getRealName(obj.Name))
|
||||
|
|
|
@ -155,8 +155,9 @@ def getSupport(args=None):
|
|||
if sel.HasSubObjects:
|
||||
if len(sel.SubElementNames) == 1:
|
||||
if "Face" in sel.SubElementNames[0]:
|
||||
if plane.weak:
|
||||
plane.alignToFace(sel.SubObjects[0])
|
||||
return sel.Object
|
||||
return sel.Object
|
||||
return None
|
||||
|
||||
snapped = Draft.get3DView().getObjectInfo((args["Position"][0],args["Position"][1]))
|
||||
|
|
|
@ -233,6 +233,7 @@ class plane:
|
|||
if not DraftVecUtils.equals(self.u.cross(self.v),self.axis):
|
||||
self.u = q[2]
|
||||
self.v = q[1]
|
||||
self.weak = False
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue
Block a user