def project_curve_to_plane(curve, plane, direction): """ Computes and returns the cylindrically projected curve onto input plane Parameters ---------- curve - geom_Curve plane - Geom_Plane dir - gp_Dir (default None) The cylindrical projection direction. If None, the project will be normal to the plane Returns ------- Hproj_curve : Handle_Geom_Curve """ from OCC.GeomProjLib import geomprojlib_ProjectOnPlane hc = coerce_handle(curve) h_pln = coerce_handle(plane) Hproj_curve = geomprojlib_ProjectOnPlane(hc, h_pln, direction, True) return Hproj_curve
def project_edge_onto_plane(edg, plane): """ :param edg: kbe.edge.Edge :param plane: Geom_Plane :return: TopoDS_Edge projected on the plane """ from OCC.GeomProjLib import geomprojlib_ProjectOnPlane proj = geomprojlib_ProjectOnPlane(edg.adaptor.Curve().Curve(), plane.GetHandle(), plane.Axis().Direction(), 1 ) return make_edge(proj)
def project_edge_onto_plane(edg, plane): """ :param edg: kbe.edge.Edge :param plane: Geom_Plane :return: TopoDS_Edge projected on the plane """ from OCC.GeomProjLib import geomprojlib_ProjectOnPlane proj = geomprojlib_ProjectOnPlane(edg.adaptor.Curve().Curve(), plane.GetHandle(), plane.Axis().Direction(), 1) return make_edge(proj)
def project_edge_onto_plane(curve, plane): """ :param curve: BRepAdaptor_Curve :param plane: Geom_Plane :return: TopoDS_Edge projected on the plane """ from OCC.GeomProjLib import geomprojlib_ProjectOnPlane proj = geomprojlib_ProjectOnPlane(curve.Curve().Curve(), plane.GetHandle(), plane.Axis().Direction(), True) return make_edge(proj)