pythonCascade Sample Problems

self.Initialize()
self.interactive_context.EraseAll(0,1)
S1 =
BRepPrimAPI_MakeBox(150,200,110).Shape()
ais1 =
AIS_Shape(S1)
self.interactive_context.SetDisplayMode(ais1,AIS_Shaded,0)
self.interactive_context.SetMaterial(ais1,Graphic3d_NOM_PLASTIC,0)
self.interactive_context.SetColor(ais1,Quantity_NOC_WHITE,0)
self.interactive_context.Display(ais1,1)
aList =
TopTools_ListOfShape()
Ex =
TopExp_Explorer(S1,TopAbs_FACE)
Ex.Next() #this is the front face
aFace =
Ex.Current()
aList.Append(aFace)
aThickSolid =
BRepOffsetAPI_MakeThickSolid(S1,aList,10,0.01).Shape()
ais1 =
AIS_Shape(aThickSolid)
self.interactive_context.SetDisplayMode(ais1,AIS_Shaded,0)
self.interactive_context.SetMaterial(ais1,Graphic3d_NOM_PLASTIC,0)
self.interactive_context.SetColor(ais1,Quantity_NOC_RED,0)
self.interactive_context.Display(ais1,1)
self.view.FitAll(0.01,0)
self.view.ZFitAll(0.01)
self.view.Redraw()