File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 2222from shell import Shell
2323
2424
25- class Solid (KbeObject , TopoDS_Solid ):
26-
27- """high level Solid Api"""
25+ class Solid (TopoDS_Solid , KbeObject ):
2826 def __init__ (self , solid ):
29- KbeObject .__init__ (name = 'solid' )
30- TopoDS_Solid .__init__ (self , solid )
27+ assert isinstance (solid , TopoDS_Solid ), 'need a TopoDS_Solid, got a %s' % solid .__class__
28+ assert not solid .IsNull ()
29+ super (Solid , self ).__init__ ()
30+ KbeObject .__init__ (self , 'solid' )
31+ # we need to copy the base shape using the following three
32+ # lines
33+ assert self .IsNull ()
34+ self .TShape (solid .TShape ())
35+ self .Location (solid .Location ())
36+ self .Orientation (solid .Orientation ())
37+ assert not self .IsNull ()
38+
3139 self .GlobalProperties = GlobalProperties (self )
3240
3341 #=======================================================================
You can’t perform that action at this time.
0 commit comments