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

做网站价钱seo优化前景

做网站价钱,seo优化前景,免费永久域名申请注册,wordpress 论坛整合opencascade TopoDS_Shape 前言 描述了一个形状,它 引用了一个基础形状,该基础形状有可能被赋予一个位置和方向 为基础形状提供了一个位置,定义了它在本地坐标系中的位置为基础形状提供了一个方向,这是从几何学的角度&#xff…

opencascade TopoDS_Shape
在这里插入图片描述

前言

描述了一个形状,它 引用了一个基础形状,该基础形状有可能被赋予一个位置和方向 为基础形状提供了一个位置,定义了它在本地坐标系中的位置为基础形状提供了一个方向,这是从几何学的角度(而不是相对于其他形状的方向)来定义的。注意:如果一个形状引用的基础形状的形状列表为空,则该形状被视为空。

1

创建一个不引用任何内容的空形状
TopoDS_Shape() : myOrient(TopAbs_EXTERNAL);

2

通用移动构造函数,也接受子类(TopoDS_Shape层次结构仅声明了没有额外字段的假子类)。
template
TopoDS_Shape(T2&& theOther, typename std::enable_if<opencascade::std::is_base_of<TopoDS_Shape, T2>::value>::type* = 0)
: myTShape(std::forward(theOther).myTShape),
myLocation(std::forward(theOther).myLocation),
myOrient(std::forward(theOther).myOrient) ;

3

通用移动赋值运算符。
template
typename std::enable_if<opencascade::std::is_base_of<TopoDS_Shape, T2>::value, TopoDS_Shape>::type&
operator=(T2&& theOther) ;

4

如果此形状为空,则返回true。换句话说,它不引用任何可能被赋予位置和方向的基础形状。
IsNull() ;

5

销毁存储在此形状中的对基础形状的引用。结果,此形状变为空。
void Nullify() ;

6

返回形状的局部坐标系。
const TopLoc_Location& Location() const { return myLocation; }

7

设置形状的局部坐标系。
void Location(const TopLoc_Location& theLoc, const Standard_Boolean theRaiseExc = Standard_True) ;

8

返回一个与相似但局部坐标系设置为的形状。
TopoDS_Shape Located(const TopLoc_Location& theLoc, const Standard_Boolean theRaiseExc = Standard_True) ;

9

返回形状的方向。
TopAbs_Orientation Orientation() const { return myOrient; }

10

设置形状的方向。
void Orientation(TopAbs_Orientation theOrient) { myOrient = theOrient; }

11

返回一个与相似但方向设置为的形状。
TopoDS_Shape Oriented(TopAbs_Orientation theOrient) const
{
TopoDS_Shape aShape(*this);
aShape.Orientation(theOrient);
return aShape;
}
#### 12
返回一个指向实际形状实现的句柄。
const Handle(TopoDS_TShape)& TShape() const { return myTShape; }
#### 13
返回与此形状对应的TopAbs_ShapeEnum枚举值,
例如VERTEX、EDGE等。 异常 如果此形状为空,则抛出Standard_NullObject异常。
TopAbs_ShapeEnum ShapeType() const { return myTShape->ShapeType(); }
#### 14
返回自由标志的值。
Standard_Boolean Free() const { return myTShape->Free(); }
#### 15
设置自由标志。
void Free(Standard_Boolean theIsFree) { myTShape->Free(theIsFree); }
#### 16
返回锁定标志的值。
Standard_Boolean Locked() const { return myTShape->Locked(); }
#### 17
设置锁定标志。
void Locked(Standard_Boolean theIsLocked) { myTShape->Locked(theIsLocked); }
#### 18
返回修改标志的值。
Standard_Boolean Modified() const { return myTShape->Modified(); }
#### 19
设置修改标志。
void Modified(Standard_Boolean theIsModified) { myTShape->Modified(theIsModified); }
####20
返回检查标志的值。
Standard_Boolean Checked() const { return myTShape->Checked(); }
#### 21
设置检查标志。
void Checked(Standard_Boolean theIsChecked) { myTShape->Checked(theIsChecked); }

22

返回可定向性标志的值。
Standard_Boolean Orientable() const { return myTShape->Orientable(); }

23

设置可定向性标志。
void Orientable(const Standard_Boolean theIsOrientable) { myTShape->Orientable(theIsOrientable); }

24

返回封闭性标志的值。
Standard_Boolean Closed() const { return myTShape->Closed(); }

25

设置封闭性标志。
void Closed(Standard_Boolean theIsClosed) { myTShape->Closed(theIsClosed); }

26

返回无穷性标志的值。
Standard_Boolean Infinite() const { return myTShape->Infinite(); }

27

设置无穷性标志。
void Infinite(Standard_Boolean theIsInfinite) { myTShape->Infinite(theIsInfinite); }

28

返回凸性标志的值。
Standard_Boolean Convex() const { return myTShape->Convex(); }

29

设置凸性标志。
void Convex(Standard_Boolean theIsConvex) { myTShape->Convex(theIsConvex); }

30

将形状的位置乘以thePosition。
void Move(const TopLoc_Location& thePosition, const Standard_Boolean theRaiseExc = Standard_True) ;

31

返回一个与相似但位置乘以thePosition的形状。
TopoDS_Shape Moved(const TopLoc_Location& thePosition, const Standard_Boolean theRaiseExc = Standard_True) ;

32

使用TopAbs包中的Reverse方法反转方向。
void Reverse() { myOrient = TopAbs::Reverse(myOrient); }

33

返回一个与相似但方向使用TopAbs包中的Reverse方法反转的形状。
TopoDS_Shape Reversed() const ;

34

使用TopAbs包中的Complement方法补全方向。
void Complement() { myOrient = TopAbs::Complement(myOrient); }

35

返回一个与相似但方向使用TopAbs包中的Complement方法补全的形状。
TopoDS_Shape Complemented() const ;

36

使用TopAbs包中的Compose方法更新形状的方向,通过与theOrient组合。
void Compose(TopAbs_Orientation theOrient) ;

37

返回一个与相似但方向使用TopAbs包中的Compose方法与theOrient组合的形状。
TopoDS_Shape Composed(TopAbs_Orientation theOrient) const ;

38

返回直接子形状(子节点)的数量。
TopoDS_Iterator 用于访问子形状
Standard_Integer NbChildren() const { return myTShape.IsNull() ? 0 : myTShape->NbChildren(); }

39

//! 如果两个形状是伙伴,则返回True,即如果它们共享同一个TShape。
//! 位置和方向可能不同。
Standard_Boolean IsPartner(const TopoDS_Shape& theOther) const { return (myTShape == theOther.myTShape); }

40

//! 如果两个形状相同,则返回True,即如果它们共享同一个TShape和相同的位置。
//! 方向可能不同。
Standard_Boolean IsSame(const TopoDS_Shape& theOther) const
{
return myTShape == theOther.myTShape
&& myLocation == theOther.myLocation;
}

45

//! 如果两个形状相等,则返回True,即如果它们共享同一个TShape、相同的位置和方向。
Standard_Boolean IsEqual(const TopoDS_Shape& theOther) const
{
return myTShape == theOther.myTShape
&& myLocation == theOther.myLocation
&& myOrient == theOther.myOrient;
}

46

//! 返回一个表示的哈希值。该值在范围[1, theUpperBound]内。它是根据
//! TShape和Location计算得出的。Orientation(方向)未被使用。
//! @param theUpperBound 计算哈希码时必须位于的范围的上界
//! @return 一个计算出的哈希码,范围在[1, theUpperBound]内
Standard_EXPORT Standard_Integer HashCode(Standard_Integer theUpperBound) const;

47

//! 用一个新的Shape替换,该Shape具有相同的
//! Orientation(方向)和Location(位置),以及一个新的TShape,该TShape具有
//! 相同的几何形状但没有子形状。
void EmptyCopy() { myTShape = myTShape->EmptyCopy(); }

48

//! 返回一个新的Shape,该Shape具有相同的
//! Orientation(方向)和Location(位置),以及一个新的TShape,该TShape具有
//! 相同的几何形状但没有子形状。
TopoDS_Shape EmptyCopied() const
{
TopoDS_Shape aShape(*this);
aShape.EmptyCopy();
return aShape;
}

49

设置TShape
void TShape(const Handle(TopoDS_TShape)& theTShape) { myTShape = theTShape; }

50

将我的内容转储到流中
Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;

用法用例

TopoDS_Shape 是 OpenCASCADE 中表示拓扑形状的基类,它本身是一个抽象类,不能直接实例化。但是,它定义了一些方法和操作,可以通过其派生类(如 TopoDS_VertexTopoDS_EdgeTopoDS_FaceTopoDS_Solid 等)来操作和访问拓扑形状的属性和信息。

以下是一些示例,展示了如何使用 TopoDS_Shape 类中的方法及其派生类的操作:

1. 获取拓扑类型

通过 ShapeType() 方法可以获取拓扑形状的类型,它返回一个枚举值,表示形状的具体类型(顶点、边、面、实体等)。

#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Solid.hxx>
#include <TopExp.hxx>
#include <iostream>void PrintShapeType(const TopoDS_Shape& shape) {switch (shape.ShapeType()) {case TopAbs_VERTEX:std::cout << "Shape is a vertex." << std::endl;break;case TopAbs_EDGE:std::cout << "Shape is an edge." << std::endl;break;case TopAbs_FACE:std::cout << "Shape is a face." << std::endl;break;case TopAbs_SOLID:std::cout << "Shape is a solid." << std::endl;break;default:std::cout << "Unknown shape type." << std::endl;break;}
}int main() {// 示例:创建一个顶点TopoDS_Vertex vertex;// 在实际应用中,需要通过构造函数或者其他方法来创建顶点// 打印顶点的类型PrintShapeType(vertex);return 0;
}
2. 拓扑结构查询

通过 TopExp 类提供的方法可以进行更复杂的拓扑结构查询,如查找顶点、边、面之间的关系和连接。

#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopExp.hxx>
#include <iostream>void PrintConnectedEdges(const TopoDS_Vertex& vertex) {// 查找连接到顶点的边TopTools_IndexedMapOfShape edgeMap;TopExp::MapShapes(vertex, TopAbs_EDGE, edgeMap);for (int i = 1; i <= edgeMap.Extent(); ++i) {const TopoDS_Edge& edge = TopoDS::Edge(edgeMap(i));std::cout << "Connected edge with orientation: " << (edge.Orientation() == TopAbs_FORWARD ? "Forward" : "Reversed") << std::endl;}
}int main() {// 示例:创建一个顶点和一条边TopoDS_Vertex vertex;// 在实际应用中,需要通过构造函数或者其他方法来创建顶点TopoDS_Edge edge;// 在实际应用中,需要通过构造函数或者其他方法来创建边// 打印顶点连接的边PrintConnectedEdges(vertex);return 0;
}
3. 拓扑属性访问

通过 TopoDS_Shape 类及其派生类可以访问拓扑形状的特定属性,如边的起点和终点、面的法向量等。

#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt.hxx>
#include <iostream>void PrintEdgeVertices(const TopoDS_Edge& edge) {// 获取边的起点和终点坐标const TopoDS_Vertex& startVertex = TopExp::FirstVertex(edge);const TopoDS_Vertex& endVertex = TopExp::LastVertex(edge);gp_Pnt startPoint = BRep_Tool::Pnt(startVertex);gp_Pnt endPoint = BRep_Tool::Pnt(endVertex);std::cout << "Edge start point: (" << startPoint.X() << ", " << startPoint.Y() << ", " << startPoint.Z() << ")" << std::endl;std::cout << "Edge end point: (" << endPoint.X() << ", " << endPoint.Y() << ", " << endPoint.Z() << ")" << std::endl;
}int main() {// 示例:创建一条边TopoDS_Edge edge;// 在实际应用中,需要通过构造函数或者其他方法来创建边// 打印边的起点和终点坐标PrintEdgeVertices(edge);return 0;
}

这些示例展示了如何利用 TopoDS_Shape 及其派生类的方法来操作和查询拓扑形状的信息。在实际应用中,根据具体的需求和场景,可以进一步组合和扩展这些方法,以实现更复杂的几何建模和拓扑操作。
参考

http://www.shuangfujiaoyu.com/news/62453.html

相关文章:

  • 最新设计网站大全百度客服中心人工在线
  • 有哪些微信开发公司班级优化大师客服电话
  • 四川住房和城乡建设厅网站不能进入网站开发制作培训学校
  • 大连金广建设集团网站免费制作网页平台
  • 创新的广州做网站有什么平台可以发布推广信息
  • 做头像的日本网站有哪些杭州明开seo
  • 网站建设与运营预算中文网站排行榜
  • 网站首页设计分析网络整合营销案例
  • wordpress封装app关键词seo服务
  • 中国设计网站排行榜百度下载安装免费版
  • 南京做网站建设有哪些内容网站建设解决方案
  • 有什么做家纺的网站推广商
  • 自己在网站做邮箱广州推广服务
  • 网站制作公司排名前十自动收录网
  • 网站续费网站排名seo
  • 武汉自适应网站建设app开发价格表
  • wordpress插件启用一站传媒seo优化
  • 免费搭建网站教程怎么利用互联网推广
  • 灰色网站模板上海seo网站推广公司
  • 仙桃做网站百度云网盘资源链接
  • 网站建设需要注意什么腾讯广告投放平台官网
  • 自建站外贸平台有哪些比较好百度竞价项目
  • 软装设计师常用网站泉州搜索推广
  • 临沂手机网站2022年近期重大新闻事件
  • 旅游网站设计与实现百度问答
  • 北京建设企业协会网站首页正安县网站seo优化排名
  • 遂宁网站建设公司seo属于什么
  • 珠海网站建设运营公司最新的国际新闻
  • 南京网络维护公司关键词排名关键词优化
  • 可以做网站的公司有哪些关键词优化按天计费