Change Line Type in OpenCascade

简介: 在OpenCascade中更改线型-Change Line Type in OpenCascade eryar@163.com   关键字KeyWords:OpenCascade,Line Aspect, Line Type   在OpenCascade的显示模块中,可以设置线型、消隐方式和离散精度等属性。

在OpenCascade中更改线型-Change Line Type in OpenCascade

eryar@163.com

 

关键字KeyWords:OpenCascade,Line Aspect, Line Type

 

在OpenCascade的显示模块中,可以设置线型、消隐方式和离散精度等属性。这些属性都是在AIS_Drawer中设置。

AIS_Drawer类就是用来管理显示属性的。可以设置如下显示属性:

  • void  SetLineAspect (const Handle< Prs3d_LineAspect > &anAspect)
  • void  SetWireAspect (const Handle< Prs3d_LineAspect > &anAspect)
  • void  SetDeviationCoefficient (const Standard_Real aCoefficient)
  • void  SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR)

以为设置线型是用SetLineAspect,结果试了一下,不成功。查找了一下论坛,也有人有同样的问题:

http://www.opencascade.org/org/forum/thread_12589/?forum=3

image

又搜索了下,发现设置拓朴形状线型的函数是用:SetWireAspect,试验成功!示例程序如下所示:

Handle_AIS_Shape xAxis  =   new  AIS_Shape(BRepBuilderAPI_MakeEdge(gp_Pnt( - 5000 , 0 , 0 ), gp_Pnt( 5000 0 0 )));

Handle_Prs3d_LineAspect lineAspect 
=   new  Prs3d_LineAspect(Quantity_NOC_WHITE, Aspect_TOL_DOTDASH,  1 );

xAxis
-> Attributes() -> SetWireAspect(lineAspect);
myAISContext
-> Display(xAxis,  false );


   

目录
相关文章
|
7月前
【echarts报错】line series not exists,should be same with series name or data name
【echarts报错】line series not exists,should be same with series name or data name
265 0
|
算法 C# C++
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
|
4月前
|
搜索推荐 Docker 容器
生信分析代码之前还好好的,怎么就报错了 Error in Ops. data. frame(guide_loc, panel_loc) :'==' only defined for equally-sized data frames
执行 `DimPlot` 函数时遇到错误 `;Error in Ops. data. frame(g guides_loc, panel_loc) : &#39;==&#39; only defined for equally-sized data frames`。解决方案和办法
1131 0
生信分析代码之前还好好的,怎么就报错了 Error in Ops. data. frame(guide_loc, panel_loc) :'==' only defined for equally-sized data frames
[√]addr2line
[√]addr2line
157 0
|
前端开发
display:contents
display:contents
55 1
|
Java
解决Command line is too long. Shorten command line for ServiceStarter or also for Application报错
解决Command line is too long. Shorten command line for ServiceStarter or also for Application报错
372 0
Cannot find source code based button in SE24
When you are logging on to customer system for incident handling, you want to switch to source code to perform some keyword search. However, you could not find button “Source code based builder” in toolbar, with following warning message: ———————————————— 版权声明:本文为CSDN博主「汪子熙」的原创文章,遵循CC 4.0 BY-SA版权协
Cannot find source code based button in SE24
HDOJ 1095 A+B for Input-Output Practice (VII)
HDOJ 1095 A+B for Input-Output Practice (VII)
110 0
HDOJ 1096 A+B for Input-Output Practice (VIII)
HDOJ 1096 A+B for Input-Output Practice (VIII)
108 0
成功解决model_selection\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in
成功解决model_selection\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in