File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 4
4
from OCP .TDocStd import TDocStd_Document
5
5
from OCP .TCollection import TCollection_ExtendedString
6
6
from OCP .XCAFDoc import XCAFDoc_DocumentTool , XCAFDoc_ColorType
7
+ from OCP .XCAFApp import XCAFApp_Application
7
8
from OCP .TDataStd import TDataStd_Name
8
9
from OCP .TDF import TDF_Label
9
10
from OCP .TopLoc import TopLoc_Location
@@ -104,7 +105,11 @@ def toCAF(
104
105
) -> Tuple [TDF_Label , TDocStd_Document ]:
105
106
106
107
# prepare a doc
108
+ app = XCAFApp_Application .GetApplication_s ()
109
+
107
110
doc = TDocStd_Document (TCollection_ExtendedString ("XmlOcaf" ))
111
+ app .InitDocument (doc )
112
+
108
113
tool = XCAFDoc_DocumentTool .ShapeTool_s (doc .Main ())
109
114
tool .SetAutoNaming_s (False )
110
115
ctool = XCAFDoc_DocumentTool .ColorTool_s (doc .Main ())
You can’t perform that action at this time.
0 commit comments