Arch: small fixes
This commit is contained in:
parent
2f67e323cb
commit
b68e86ffa5
|
@ -242,7 +242,7 @@ class _ArchDrawingView:
|
|||
if hasattr(obj,"Source"):
|
||||
if obj.Source:
|
||||
if obj.Source.Objects:
|
||||
objs = Draft.getGroupContents(obj.Source.Objects)
|
||||
objs = Draft.getGroupContents(obj.Source.Objects,walls=True)
|
||||
objs = Draft.removeHidden(objs)
|
||||
self.svg = ''
|
||||
|
||||
|
@ -252,7 +252,7 @@ class _ArchDrawingView:
|
|||
import ArchVRM
|
||||
render = ArchVRM.Renderer()
|
||||
render.setWorkingPlane(obj.Source.Placement)
|
||||
render.addObjects(Draft.getGroupContents(objs,walls=True))
|
||||
render.addObjects(objs)
|
||||
if hasattr(obj,"ShowCut"):
|
||||
render.cut(obj.Source.Shape,obj.ShowCut)
|
||||
else:
|
||||
|
@ -336,6 +336,8 @@ class _ArchDrawingView:
|
|||
else:
|
||||
if not self.svg:
|
||||
self.buildSVG(obj)
|
||||
if not hasattr(self,"svg"):
|
||||
return ''
|
||||
linewidth = obj.LineWidth/obj.Scale
|
||||
st = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetFloat("CutLineThickness")
|
||||
if not st:
|
||||
|
|
|
@ -2746,7 +2746,29 @@ class _Shape2DView:
|
|||
import Drawing, DraftGeomUtils
|
||||
pl = obj.Placement
|
||||
if obj.Base:
|
||||
if obj.Base.isDerivedFrom("Part::Feature"):
|
||||
if getType(obj.Base) == "SectionPlane":
|
||||
if obj.Base.Objects:
|
||||
import Arch, Part, Drawing
|
||||
objs = getGroupContents(obj.Base.Objects,walls=True)
|
||||
objs = removeHidden(objs)
|
||||
shapes = []
|
||||
for o in objs:
|
||||
if o.isDerivedFrom("Part::Feature"):
|
||||
shapes.extend(o.Shape.Solids)
|
||||
cutp,cutv,iv =Arch.getCutVolume(obj.Base.Shape,shapes)
|
||||
cuts = []
|
||||
for sh in shapes:
|
||||
if sh.Volume < 0:
|
||||
sh.reverse()
|
||||
c = sh.cut(cutv)
|
||||
cuts.extend(c.Solids)
|
||||
comp = Part.makeCompound(cuts)
|
||||
opl = FreeCAD.Placement(obj.Base.Placement)
|
||||
proj = opl.Rotation.multVec(FreeCAD.Vector(0,0,1))
|
||||
[visibleG0,visibleG1,hiddenG0,hiddenG1] = Drawing.project(comp,proj)
|
||||
if visibleG0:
|
||||
obj.Shape = visibleG0
|
||||
elif obj.Base.isDerivedFrom("Part::Feature"):
|
||||
if not DraftVecUtils.isNull(obj.Projection):
|
||||
[visibleG0,visibleG1,hiddenG0,hiddenG1] = Drawing.project(obj.Base.Shape,obj.Projection)
|
||||
if visibleG0:
|
||||
|
|
Loading…
Reference in New Issue
Block a user