Draft+Arch: Fix crash related to SoBrepEdgeSet

This commit is contained in:
Roy-043
2022-09-28 17:31:12 +02:00
parent 849305b88a
commit 8a91607778
5 changed files with 8 additions and 1 deletions

View File

@@ -658,6 +658,7 @@ class ViewProviderBuildingPart:
self.sep.addChild(self.dst)
self.lco = coin.SoCoordinate3()
self.sep.addChild(self.lco)
import PartGui # Required for "SoBrepEdgeSet" (because a BuildingPart is not a Part::FeaturePython object).
lin = coin.SoType.fromName("SoBrepEdgeSet").createInstance()
if lin:
lin.coordIndex.setValues([0,1,-1,2,3,-1,4,5,-1])

View File

@@ -1054,6 +1054,7 @@ class _ViewProviderSectionPlane:
self.drawstyle = coin.SoDrawStyle()
self.drawstyle.style = coin.SoDrawStyle.LINES
self.lcoords = coin.SoCoordinate3()
import PartGui # Required for "SoBrepEdgeSet" (because a SectionPlane is not a Part::FeaturePython object).
ls = coin.SoType.fromName("SoBrepEdgeSet").createInstance()
ls.coordIndex.setValues(0,57,[0,1,-1,2,3,4,5,-1,6,7,8,9,-1,10,11,-1,12,13,14,15,-1,16,17,18,19,-1,20,21,-1,22,23,24,25,-1,26,27,28,29,-1,30,31,-1,32,33,34,35,-1,36,37,38,39,-1,40,41,42,43,44])
self.txtcoords = coin.SoTransform()