我有一個關於如何在pythonOCC中使用樣條的兩部分問題。如何在pythonOCC中使用樣條曲線?
首先,我知道我可以創建一個樣條
array = []
array.append(gp_Pnt2d (0,0))
array.append(gp_Pnt2d (1,2))
array.append(gp_Pnt2d (2,3))
array.append(gp_Pnt2d (4,3))
array.append(gp_Pnt2d (5,5))
pt2d_list = point2d_list_to_TColgp_Array1OfPnt2d(array)
SPL1 = Geom2dAPI_PointsToBSpline(pt2d_list).Curve()
display.DisplayShape(make_edge2d(SPL1) , update=True)
,我想到的是,B樣條可以通過
BSPL1 = Geom2dAPI_PointsToBSpline(pt2d_list)
來計算,但我如何獲得:
- bspline的衍生物?
- bspline的結?
- 是結pt2d_list?
- bspline的控制點?
- 樣條的係數?
而我該如何刪除或添加結到bspline?
其次,在裝載pythonOCC這樣的CAD圖紙的.stp文件時:
from OCC import TopoDS, StlAPI
shape = TopoDS.TopoDS_Shape()
stl_reader = StlAPI.StlAPI_Reader()
stl_reader.Read(shape,str(filename))
display.DisplayShape(shape)
我如何獲取數據出像結,B樣條,和係數的形狀。
您是否在其他地方找到答案?你可以請與我們分享:D? – Jiloc
絕望老................. –