FreeCAD二次开发-Part.Shape合并几何元素,生成拓扑形状

from FreeCAD import Base
# 点坐标
V1 = Base.Vector(0,10,0)
V2 = Base.Vector(30,10,0)
V3 = Base.Vector(30,-10,0)
V4 = Base.Vector(0,-10,0)
VC1 = Base.Vector(-10,0,0)
VC2 = Base.Vector(40,0,0)
# 创建圆弧
C1 = Part.Arc(V1,VC1,V4)
C2 = Part.Arc(V2,VC2,V3)
# 创建直线
L1 = Part.LineSegment(V1,V2)
L2 = Part.LineSegment(V3,V4)
# 合并几何元素,生成拓扑形状
S1 = Part.Shape([C1,L1,C2,L2])
# 得到拓扑形状的边
W = Part.Wire(S1.Edges)
# 创建面
face=Part.Face(W)
# 创建拉伸
P = face.extrude(Base.Vector(0,0,10))
# 显示拉伸
Part.show(P)

Caesar卢尚宇
2020年3月31日

原文地址:https://www.cnblogs.com/nxopen2018/p/12608030.html

时间: 2024-10-10 18:28:58

FreeCAD二次开发-Part.Shape合并几何元素,生成拓扑形状的相关文章

FreeCAD二次开发-Part.Face创建面

from FreeCAD import Base # 点坐标 V1 = Base.Vector(0,10,0) V2 = Base.Vector(30,10,0) V3 = Base.Vector(30,-10,0) V4 = Base.Vector(0,-10,0) VC1 = Base.Vector(-10,0,0) VC2 = Base.Vector(40,0,0) # 创建圆弧 C1 = Part.Arc(V1,VC1,V4) C2 = Part.Arc(V2,VC2,V3) # 创建直

FreeCAD二次开发-Part.LineSegment创建直线

from FreeCAD import Base # 点坐标 V1 = Base.Vector(0,10,0) V2 = Base.Vector(30,10,0) V3 = Base.Vector(30,-10,0) V4 = Base.Vector(0,-10,0) VC1 = Base.Vector(-10,0,0) VC2 = Base.Vector(40,0,0) # 创建圆弧 C1 = Part.Arc(V1,VC1,V4) C2 = Part.Arc(V2,VC2,V3) # 创建直

FreeCAD二次开发-face.extrude创建拉伸

from FreeCAD import Base # 点坐标 V1 = Base.Vector(0,10,0) V2 = Base.Vector(30,10,0) V3 = Base.Vector(30,-10,0) V4 = Base.Vector(0,-10,0) VC1 = Base.Vector(-10,0,0) VC2 = Base.Vector(40,0,0) # 创建圆弧 C1 = Part.Arc(V1,VC1,V4) C2 = Part.Arc(V2,VC2,V3) # 创建直

FreeCAD二次开发-Part.Arc创建圆弧

from FreeCAD import Base # 点坐标 V1 = Base.Vector(0,10,0) V2 = Base.Vector(30,10,0) V3 = Base.Vector(30,-10,0) V4 = Base.Vector(0,-10,0) VC1 = Base.Vector(-10,0,0) VC2 = Base.Vector(40,0,0) # 创建圆弧 C1 = Part.Arc(V1,VC1,V4) C2 = Part.Arc(V2,VC2,V3) # 创建直

FreeCAD二次开发-Part.makeCylinder创建圆柱

FreeCAD作为一款基于OpenCasCAD内核的开源CAD软件,可以在GitHub上下载源代码.阅读源代码,有助于我们学习CAD软件架构,了解底层几何算法. 由博主Caesar卢尚宇自学整理(纯粹出于对三维CAD软件开发的热爱) # 指定半径和高度b=Part.makeCylinder(20,50)# 显示对象 Part.show(b) 原文地址:https://www.cnblogs.com/nxopen2018/p/12555421.html

FreeCAD二次开发-PySide例子QtGui.QInputDialog弹出输入框

FreeCAD作为一款基于OpenCasCAD内核的开源CAD软件,可以在GitHub上下载源代码.阅读源代码,有助于我们学习CAD软件架构,了解底层几何算法. 由博主Caesar卢尚宇自学整理(纯粹出于对三维CAD软件开发的热爱) 内容出自FreeCAD官方社区https://wiki.freecadweb.org/PySide_Beginner_Examples from PySide import QtGui, QtCore reply = QtGui.QInputDialog.getTe

FreeCAD二次开发-Gui.Selection.getSelectionEx() 遍历选中的对象

import Part Part.show(Part.makeBox(100,100,100)) Gui.SendMsgToActiveView("ViewFit") length = 0.0 for o in Gui.Selection.getSelectionEx(): for s in o.SubObjects: length += s.Length print "Length of the selected edges:" ,length Caesar卢尚宇

Su二次开发--墙面竖向龙骨的生成

g = Sketchup.active_model.selection[0] gps = g.entities.grep(Sketchup::Group) gp1 = gps.find{|gp| gp.get_attribute("DFC_AN_ZsggTool","构件群组") == "竖骨线组"} path_hash = { s_sk_path: File.expand_path("../曲面竖向龙骨.skp", __FI

tensorflow二次开发

编译 方法1: 1 2 3 4 5 6 7 ./configure bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package build出错清理: /root/.cache/bazel 把下面的之前出错的缓存文件给删除掉 生成whell包 bazel-bin/tensorflow/tools/pip_package/build_pip_package /root/tensorflow/wheel_pkg/b