MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / createLine

Method createLine

src/Edge.cc:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62int Edge::createLine(Vertex *start, Vertex *end)
63{
64
65 try {
66 gp_Pnt aP1 = start->point();
67 gp_Pnt aP2 = end->point();
68
69 gce_MakeLin mLine(aP1, aP2);
70 const gp_Lin& line= mLine.Value();
71
72 TopoDS_Shape shape = BRepBuilderAPI_MakeEdge(line, start->vertex(), end->vertex());
73 this->setShape(shape);
74
75 }
76 CATCH_AND_RETHROW_NO_RETURN("Failed to create line");
77
78 return 1;
79}
80
81int Edge::createArc(Vertex *start, Vertex *end, const gp_Pnt& center)
82{

Callers 2

test1.jsFile · 0.80
NAN_METHODFunction · 0.80

Calls 2

setShapeMethod · 0.95
pointMethod · 0.80

Tested by

no test coverage detected