how to set width/thickness of line/curve?

eue

Active CAD practitioner
I used BRepBuilderAPI_MakeEdge to create a line shape and would like to set its display thickness?

Code:
    gp_Pnt P1 = myStartPoint->Pnt();
    gp_Pnt P2 = myEndPoint->Pnt();

    Handle(Geom_Line) myComponent = new Geom_Line(P1, gp_Dir(P2.XYZ() - P1.XYZ()));


    Standard_Real dist = P1.Distance(P2);
   
    GeomAdaptor_Curve curv(myComponent, 0., dist);
   
    TopoDS_Edge line = BRepBuilderAPI_MakeEdge(curv.Curve());
 

Jonathan

CAD community veteran
you will want to set this property on the visualisation object

ais->Attributes()->SetWireAspect(new Prs3d_LineAspect(Quantity_NOC_ALICEBLUE, Aspect_TypeOfLine::Aspect_TOL_SOLID, 10.0));
 

JSlyadne

Administrator
Staff member
I used BRepBuilderAPI_MakeEdge to create a line shape and would like to set its display thickness?

Code:
    gp_Pnt P1 = myStartPoint->Pnt();
    gp_Pnt P2 = myEndPoint->Pnt();

    Handle(Geom_Line) myComponent = new Geom_Line(P1, gp_Dir(P2.XYZ() - P1.XYZ()));


    Standard_Real dist = P1.Distance(P2);
  
    GeomAdaptor_Curve curv(myComponent, 0., dist);
  
    TopoDS_Edge line = BRepBuilderAPI_MakeEdge(curv.Curve());
Since this question is posted in the section devoted to Analysis Situs software, I'd like to clarify what is the workflow? Do you seek a possibilty to do that in AS GUI or programmatically? Or maybe there is a misunderstanding, and you're looking for visualization services of Open Cascade?
 
Top