查看: 3259|回复: 3
收起左侧

[Tribon] 利用开源ANYCAD,通过抽取TRIBON数据,生成型材小票3D作业指导书

[复制链接]
发表于 2023-3-2 23:41 | 显示全部楼层 |阅读模式 来自: 中国上海
  1. mRenderView.ClearAll()   '清楚屏幕
  2.         'HP320*12的型材外轮廓
  3.         Dim HPShapes As New TopoShapeList From {
  4.             SketchBuilder.MakeLine(New GPnt(0, 0, 0), New GPnt(0, 0, 320)),
  5.             SketchBuilder.MakeLine(New GPnt(0, 0, 320), New GPnt(0, 44, 320)),
  6.             SketchBuilder.MakeArcOfCircle(New GPnt(0, 44.0, 320), New GPnt(0, 51.0, 293.9), New GPnt(0, 57.5, 309.6)),
  7.             SketchBuilder.MakeLine(New GPnt(0, 51.0, 293.9), New GPnt(0, 19, 275.4)),
  8.             SketchBuilder.MakeArcOfCircle(New GPnt(0, 19, 275.4), New GPnt(0, 12, 263.3), New GPnt(0, 13.9, 270.3)),
  9.             SketchBuilder.MakeLine(New GPnt(0, 12, 263.3), New GPnt(0, 12, 0)),
  10.             SketchBuilder.MakeLine(New GPnt(0, 12, 0), New GPnt(0, 0, 0))
  11.         }
  12.         '腹板端切CUT轮廓
  13.         Dim WEBShapes As New TopoShapeList From {
  14.             SketchBuilder.MakeArcOfCircle(New GPnt(50, 0, 0), New GPnt(0, 0, 50), New GPnt(35.4, 0, 35.4)),
  15.             SketchBuilder.MakeLine(New GPnt(0, 0, 50), New GPnt(0, 0, 150)),
  16.             SketchBuilder.MakeLine(New GPnt(0, 0, 150), New GPnt(294.4, 0, 320)),
  17.             SketchBuilder.MakeLine(New GPnt(294.4, 0, 320), New GPnt(-100, 0, 320)),
  18.             SketchBuilder.MakeLine(New GPnt(-100, 0, 320), New GPnt(-100, 0, 0)),
  19.             SketchBuilder.MakeLine(New GPnt(-100, 0, 0), New GPnt(50, 0, 0))
  20.         }
  21.         '面板端切CUT轮廓
  22.         Dim FLAShapes As New TopoShapeList From {
  23.             SketchBuilder.MakeLine(New GPnt(-100, 12, 0), New GPnt(294.4, 12, 0)),
  24.             SketchBuilder.MakeLine(New GPnt(294.4, 12, 0), New GPnt(294.4, 27, 0)),
  25.             SketchBuilder.MakeLine(New GPnt(294.4, 27, 0), New GPnt(348.1, 58, 0)),
  26.             SketchBuilder.MakeLine(New GPnt(348.1, 58, 0), New GPnt(-100, 58, 0)),
  27.             SketchBuilder.MakeLine(New GPnt(-100, 58, 0), New GPnt(-100, 12, 0))
  28.         }

  29.         Dim HBface = SketchBuilder.MakePlanarFace(SketchBuilder.MakeWire(HPShapes)) 'HP320*12的型材外轮廓组合成面
  30.         Dim HBpart = FeatureTool.Extrude(HBface, 2000, New GDir(1, 0, 0)) '拉伸腹板端切CUT轮廓

  31.         Dim WEBface = SketchBuilder.MakePlanarFace(SketchBuilder.MakeWire(WEBShapes)) '轮廓组合成面
  32.         Dim WEBpart = FeatureTool.Extrude(WEBface, 300, New GDir(0, 1, 0)) '拉伸腹板端切CUT轮廓

  33.         Dim FLAface = SketchBuilder.MakePlanarFace(SketchBuilder.MakeWire(FLAShapes)) '轮廓组合成面
  34.         Dim FLApart = FeatureTool.Extrude(FLAface, 350, New GDir(0, 0, 1)) '面板端切CUT轮廓

  35.         Dim part As TopoShape = BooleanTool.Cut(HBpart, WEBpart) '布尔运算-,切出腹板形状
  36.         part = BooleanTool.Cut(part, FLApart) '布尔运算-,切出页板形状

  37.         mRenderView.ShowShape(part, ColorTable.Beige) '显示模型

  38.         '标注腹板留根尺寸
  39.         Dim dim1 = New LinearDimensionNode(New Vector3(0, 0, 0), New Vector3(0, 0, 150), New Vector3(-20, 0, 75), 90, "150")
  40.         dim1.SetFontHeight(30)
  41.         dim1.SetArrowLength(30)
  42.         dim1.Update()
  43.         mRenderView.ShowSceneNode(dim1)

  44.         '标注腹板削斜角度
  45.         Dim angle = New AngularDimensionNode(New Vector3(0, 0, 150), New Vector3(200, 0, 150), New Vector3(147.2, 0, 235), "30")
  46.         angle.SetFontHeight(30)
  47.         angle.SetArrowLength(30)
  48.         angle.Update()
  49.         mRenderView.ShowSceneNode(angle)
  50.         Dim line_SB = SketchBuilder.MakeLine(New GPnt(0, 0, 150), New GPnt(220, 0, 150))
  51.         mRenderView.ShowShape(line_SB, ColorTable.Cyan)

  52.         '标注面板留根尺寸
  53.         Dim dim2 = New LinearDimensionNode(New Vector3(294.4, 0, 320), New Vector3(294.4, 25, 320), New Vector3(274.4, 90, 320), 90, "25")
  54.         dim2.SetFontHeight(30)
  55.         dim2.SetArrowLength(10)
  56.         dim2.SetArrowStyle(EnumDimensionArrowStyle.ARCHTICK)
  57.         dim2.Update()
  58.         mRenderView.ShowSceneNode(dim2)

  59.         '标注面板削斜角度
  60.         Dim angle1 = New AngularDimensionNode(New Vector3(294.4, 25, 320), New Vector3(494.4, 25, 320), New Vector3(484.93, 135, 320), "30")
  61.         angle1.SetFontHeight(30)
  62.         angle1.SetArrowLength(30)
  63.         angle1.Update()
  64.         mRenderView.ShowSceneNode(angle1)
  65.         Dim line_SB1 = SketchBuilder.MakeLine(New GPnt(294.4, 25, 320), New GPnt(524.4, 25, 320))
  66.         mRenderView.ShowShape(line_SB1, ColorTable.Cyan)
  67.         Dim line_SB2 = SketchBuilder.MakeLine(New GPnt(294.4, 25, 320), New GPnt(484.93, 135, 320))
  68.         mRenderView.ShowShape(line_SB2, ColorTable.Cyan)

  69.         '标注端切R
  70.         Dim radiusDim = New RadiusDimensionNode(New Vector3(0, 0, 0), New Vector3(35.36, 0, 35.36), New Vector3(70.71, 0, 70.71), "R50")
  71.         radiusDim.SetFontHeight(30)
  72.         radiusDim.SetArrowLength(30)
  73.         radiusDim.Update()
  74.         mRenderView.ShowSceneNode(radiusDim)

  75.         mRenderView.ZoomAll()
复制代码
效果图如下: image.png -->

image.png -->


image.png -->


image.png -->

image.png -->

评分

参与人数 1金币 +5 收起 理由
黑白循环 + 5 技术指点,共同进步

查看全部评分

回复

使用道具 举报

龙船学院
发表于 2023-3-3 09:48 | 显示全部楼层 来自: 中国江苏镇江
牛人,太厉害了
回复 支持 反对

使用道具 举报

发表于 2023-3-6 21:54 | 显示全部楼层 来自: 中国湖北武汉
大佬厉害了
回复 支持 反对

使用道具 举报

发表于 2023-7-20 06:13 | 显示全部楼层 来自: 中国福建厦门
太强悍了,学习
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|标签|免责声明|龙船社区

GMT+8, 2024-11-5 04:51

Powered by Imarine

Copyright © 2006, 龙船社区

快速回复 返回顶部 返回列表