当前位置: 首页 > news >正文

个人做电梯网站seo教学免费课程霸屏

个人做电梯网站,seo教学免费课程霸屏,燕郊做网站找谁,怎么优化网站1、通过参数进行分割 分别获得曲线的 FirstParameter 和 LastParameter ,然后对参数进行分割,获得n个ui,并对每个ui调用D0(获得这个点的坐标值)或D1(获得这个点的坐标值和切向量)。这个方法的优…

1、通过参数进行分割

分别获得曲线的 FirstParameter 和 LastParameter ,然后对参数进行分割,获得n个ui,并对每个ui调用D0(获得这个点的坐标值)或D1(获得这个点的坐标值和切向量)。这个方法的优点是,简单易行,好操作,缺点均分参数轴获得的曲线的分割可能不是均匀的。

#include <Geom_CylindricalSurface.hxx>
#include <gp_Ax3.hxx>
#include <GeomAPI_Interpolate.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GCE2d_MakeSegment.hxx>
​
#include <GeomAPI_PointsToBSpline.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <GC_MakeCircle.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepOffsetAPI_MakePipe.hxx>
#include <GC_MakeArcOfCircle.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
​
#include <gp_GTrsf.hxx>
#include <BRepBuilderAPI_Transform.hxx>
​
#include"Viewer.h"
​
​
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_GTransform.hxx>
​
​
int main(int argc, char* argv[])
{gp_Dir  Z(0.0, 0.0, 1.0);gp_Pnt center(0, 0, 0.0);gp_Pnt xr(0.5, 0, 0.0);gp_Pnt yr(0.0, 1.0, 0.0);gp_Pnt zr(0.0, 0.0, 7.0);gp_Ax2  wb(center, Z);gp_Circ  wbcircle(wb, 0.125 / 2);TopoDS_Edge wbe = BRepBuilderAPI_MakeEdge(wbcircle);TopoDS_Edge xline = BRepBuilderAPI_MakeEdge(center, xr);TopoDS_Edge yline = BRepBuilderAPI_MakeEdge(center, yr);TopoDS_Edge zline = BRepBuilderAPI_MakeEdge(center, zr);gp_Pnt p1(-5, 0, 0.0);gp_Pnt p2(5, 0, 0.0);gp_Ax2  sr(center, Z);gp_Circ  bcircle(sr, 5);Handle(Geom_TrimmedCurve) bc = GC_MakeArcOfCircle(bcircle, p1, p2, 0);TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge(bc);Standard_Integer splitN = 10;Standard_Real firstParam = bc->FirstParameter();Standard_Real lastParam = bc->LastParameter();Viewer vout(50, 50, 500, 500);for (Standard_Integer i = 0; i < splitN + 1; ++i){Standard_Real ui = i * (lastParam - firstParam) / splitN;gp_Pnt pi;gp_Vec veci;bc->D1(ui, pi, veci);TopoDS_Vertex verti = BRepBuilderAPI_MakeVertex(pi);vout << verti;}vout << anEdge;vout << xline;vout << yline;vout << zline;vout.StartMessageLoop();return 0;
}
​

2、直接对曲线分割

通过类 GCPnts_UniformAbscissa 实现对一个Geom_Curve对象的平均分割,获得分割点的坐标及对应的参数,将坐标和参数存入一个列表中,供其他操作使用。

#include <Geom_CylindricalSurface.hxx>
#include <gp_Ax3.hxx>
#include <GeomAPI_Interpolate.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GCE2d_MakeSegment.hxx>
​
#include <GeomAPI_PointsToBSpline.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <GC_MakeCircle.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepOffsetAPI_MakePipe.hxx>
#include <GC_MakeArcOfCircle.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
​
#include <gp_GTrsf.hxx>
#include <BRepBuilderAPI_Transform.hxx>
​
#include"Viewer.h"
​
​
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <GCPnts_UniformAbscissa.hxx>
​
​
int main(int argc, char* argv[])
{gp_Dir  Z(0.0, 0.0, 1.0);gp_Pnt center(0, 0, 0.0);gp_Pnt xr(0.5, 0, 0.0);gp_Pnt yr(0.0, 1.0, 0.0);gp_Pnt zr(0.0, 0.0, 7.0);gp_Ax2  wb(center, Z);gp_Circ  wbcircle(wb, 0.125 / 2);TopoDS_Edge wbe = BRepBuilderAPI_MakeEdge(wbcircle);TopoDS_Edge xline = BRepBuilderAPI_MakeEdge(center, xr);TopoDS_Edge yline = BRepBuilderAPI_MakeEdge(center, yr);TopoDS_Edge zline = BRepBuilderAPI_MakeEdge(center, zr);gp_Pnt p1(-5, 0, 0.0);gp_Pnt p2(5, 0, 0.0);gp_Ax2  sr(center, Z);gp_Circ  bcircle(sr, 5);Handle(Geom_TrimmedCurve) bc = GC_MakeArcOfCircle(bcircle, p1, p2, 0);TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge(bc);Standard_Integer splitN = 10;GeomAdaptor_Curve GAC(bc);GCPnts_UniformAbscissa UA(GAC, splitN + 1);gp_Pnt* pnts = new gp_Pnt[splitN + 1];Standard_Real* params = new Standard_Real[splitN + 1];Viewer vout(50, 50, 500, 500);if (UA.IsDone()){Standard_Real n = UA.NbPoints();Standard_Integer index = 0;for (; index < n + 1; index++){Standard_Real parami = UA.Parameter(index + 1);params[index] = parami;gp_Pnt tpnt;bc->D0(parami, tpnt);pnts[index] = tpnt;TopoDS_Vertex verti = BRepBuilderAPI_MakeVertex(tpnt);vout << verti;}}vout << anEdge;vout << xline;vout << yline;vout << zline;vout.StartMessageLoop();return 0;
}
​

http://www.dt0577.cn/news/29586.html

相关文章:

  • 网站源码带后台seo的优点
  • 做电脑网站用什么软件好用吗关键词首页排名代发
  • 英文网站模板cms北京全网营销推广
  • 廊坊做网站哪家好广东培训seo
  • wordpress 小人百度seo优化排名
  • 做网站图片多少钱南宁seo排名外包
  • 代办执照seo是什么意思电商
  • 中国建设银行青岛分行网站产品软文范例
  • 成功案例 品牌网站百度平台商家客服电话
  • 关于建设集团公司网站的报告广告平台推广渠道
  • 工商企业年报查询入口广州seo技术外包公司
  • 南桥做网站随州seo
  • 网站定制案例怎样做一个产品营销方案
  • 东莞东城做网站公司惠州seo关键字优化
  • 多语种外贸网站建设得物app的网络营销分析论文
  • 网站登录页面html模板给网站做seo的价格
  • 天津网站建设案例教程网站seo技术能不能赚钱
  • 以下属于b2c网站的是国外域名
  • 做网站预算福州seo网站推广优化
  • 做网站seo推广公司中央新闻频道直播今天
  • 泉州模板建站软件人力资源管理师
  • 做期货看那个网站比较专业灰色关键词排名代发
  • 已有网站怎么修改游戏代理平台
  • 香港建设银行招聘网站seo描述是什么
  • 射阳做网站常见的营销方式有哪些
  • 网站制作品牌公司外贸网络营销
  • 苏州营销网站建设惠州seo排名
  • 成都电子商务网站建设公司广告推广免费发布
  • 永川疫情风险区新乡百度网站优化排名
  • 新乡网站建设多少钱全网营销推广靠谱吗