贵阳做网站的大公司机械厂做网站到底有没有效果
2026/1/24 20:17:22 网站建设 项目流程
贵阳做网站的大公司,机械厂做网站到底有没有效果,wordpress做表格,网络营销毕业设计一#xff1a;主要的知识点 1、说明 本文只是教程内容的一小段#xff0c;因博客字数限制#xff0c;故进行拆分。主教程链接#xff1a;vtk教程——逐行解析官网所有Python示例-CSDN博客 2、知识点纪要 本段代码主要涉及的有①切割模型并用颜色填充横截面 二#xff…一主要的知识点1、说明本文只是教程内容的一小段因博客字数限制故进行拆分。主教程链接vtk教程——逐行解析官网所有Python示例-CSDN博客2、知识点纪要本段代码主要涉及的有①切割模型并用颜色填充横截面二代码及注释import vtkmodules.vtkRenderingOpenGL2 from vtkmodules.vtkCommonColor import vtkNamedColors from vtkmodules.vtkCommonDataModel import vtkPlane, vtkPolyData from vtkmodules.vtkFiltersSources import vtkSphereSource from vtkmodules.vtkFiltersCore import vtkCutter, vtkFeatureEdges, vtkStripper from vtkmodules.vtkRenderingCore import ( vtkActor, vtkPolyDataMapper, vtkProperty, vtkRenderWindow, vtkRenderWindowInteractor, vtkRenderer ) def main(): colors vtkNamedColors() sphere vtkSphereSource() sphere.SetRadius(50) sphere.SetThetaResolution(100) sphere.SetPhiResolution(100) # cubeMapper vtkPolyDataMapper() # cubeMapper.SetInputConnection(cube.GetOutputPort()) plane vtkPlane() plane.SetOrigin(20, 0, 0) plane.SetNormal(1, 0, 0) cutter vtkCutter() cutter.SetCutFunction(plane) cutter.SetInputConnection(sphere.GetOutputPort()) cutter.Update() # FeatureEdges vtkFeatureEdges() # FeatureEdges.SetInputConnection(cutter.GetOutputPort()) # FeatureEdges.BoundaryEdgesOn() # FeatureEdges.FeatureEdgesOff() # FeatureEdges.ManifoldEdgesOff() # FeatureEdges.NonManifoldEdgesOff() # FeatureEdges.Update() cutStrips vtkStripper() cutStrips.SetInputConnection(cutter.GetOutputPort()) cutStrips.Update() cutPoly vtkPolyData() cutPoly.SetPoints(cutStrips.GetOutput().GetPoints()) cutPoly.SetPolys(cutStrips.GetOutput().GetLines()) cutMapper vtkPolyDataMapper() cutMapper.SetInputData(cutPoly) backface vtkProperty() backface.SetColor(colors.GetColor3d(Gold)) cutActor vtkActor() cutActor.SetMapper(cutMapper) cutActor.GetProperty().SetColor(colors.GetColor3d(Yellow)) cutActor.GetProperty().SetEdgeColor(colors.GetColor3d(Red)) cutActor.GetProperty().SetLineWidth(2) cutActor.GetProperty().EdgeVisibilityOn() # cutActor.GetProperty().SetOpacity(0.7) cutActor.SetBackfaceProperty(backface) ren vtkRenderer() ren.AddActor(cutActor) # Add renderer to renderwindow and render renWin vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetSize(600, 400) renWin.SetWindowName(FilledPolygon) iren vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.SetBackground(colors.GetColor3d(DarkSlateGray)) ren.GetActiveCamera().SetPosition(223, -122, -91) renWin.Render() camera ren.GetActiveCamera() camera.SetPosition(151.519511, 12.795117, -223.586044) camera.SetFocalPoint(12.518283, 1.963242, 7.618042) camera.SetViewUp(0.740690, -0.523767, 0.420769) camera.SetDistance(269.988889) camera.SetClippingRange(175.347580, 366.490816) camera.Zoom(1.5) iren.Start() if __name__ __main__: main()

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询