MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / cstrIntersection

Function cstrIntersection

python/src/Construct/Intersection.cpp:16–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15namespace py = pybind11;
16void cstrIntersection(py::module_&m)
17{
18 py::class_<LNLib::Intersection>(m, "Intersection")
19 .def_static("ComputeRays", [](const LNLib::XYZ& point0, const LNLib::XYZ& vector0, const LNLib::XYZ& point1, const LNLib::XYZ& vector1) {
20 double param0, param1;
21 LNLib::XYZ intersectPoint;
22 LNLib::CurveCurveIntersectionType type = LNLib::Intersection::ComputeRays(point0, vector0, point1, vector1, param0, param1, intersectPoint);
23 return py::make_tuple(type, param0, param1, intersectPoint);
24 })
25 .def_static("ComputeLineAndPlane", [](const LNLib::XYZ& normal, const LNLib::XYZ& pointOnPlane, const LNLib::XYZ& pointOnLine, const LNLib::XYZ& lineDirection) {
26 LNLib::XYZ intersectPoint;
27 LNLib::LinePlaneIntersectionType type = LNLib::Intersection::ComputeLineAndPlane(normal, pointOnPlane, pointOnLine, lineDirection, intersectPoint);
28 return py::make_tuple(type, intersectPoint);
29 });
30}

Callers 1

constructFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected