Project Curve to Surface (NURBS)
================================

.. image:: https://user-images.githubusercontent.com/14288520/210410308-02ecf99b-a014-44af-95db-f799c819c2cd.png
  :target: https://user-images.githubusercontent.com/14288520/210410308-02ecf99b-a014-44af-95db-f799c819c2cd.png

Dependencies
------------

This node requires FreeCAD_ libraries installed to work.

.. _FreeCAD: https://www.freecadweb.org/

Functionality
-------------

This node calculates the projection of a given Curve onto given Surface. Several types of projections are available.

.. image:: https://user-images.githubusercontent.com/14288520/210420319-d09d466d-e10b-4034-bdcf-1e096ba9d264.png
  :target: https://user-images.githubusercontent.com/14288520/210420319-d09d466d-e10b-4034-bdcf-1e096ba9d264.png

**NOTE**: This node can work with NURBS and NURBS-like curves and surfaces only. Output curves are always NURBS.

.. image:: https://user-images.githubusercontent.com/14288520/210420587-ede263d9-7157-4049-9b6d-fc259dd19612.png
  :target: https://user-images.githubusercontent.com/14288520/210420587-ede263d9-7157-4049-9b6d-fc259dd19612.png

Inputs
------

This node has the following inputs:

* **Curve**. The curve to be projected. This input is mandatory.
* **Surface**. The surface to be projected. This input is mandatory.
* **Vector**. Parallel projection vector. This input is available only if
  **Projection** parameter is set to **Parallel**. The default value is ``(0,
  0, -1)`` (down along Z axis).
* **Point**. Perspective projection origin point. This input is available only
  if **Projection** parameter is set to **Perspective**. The default value is
  ``(0, 0, 0)`` (global origin).

.. image:: https://user-images.githubusercontent.com/14288520/210423685-214ce79b-ac75-42de-8891-4994a555c5d3.png
  :target: https://user-images.githubusercontent.com/14288520/210423685-214ce79b-ac75-42de-8891-4994a555c5d3.png

Parameters
----------

This node has the following parameter:

* **Projection**. This defines what sort of projection will be used to
  calculate the trimming of the Surface. The available options are:

  * **Parallel**. Parallel projection along a provided Vector. This option is the default one.
  * **Perspective**. Perspective projection from a provided origin point.
  * **Orthogonal**. Orthogonal projection (along surface's normals).

.. image:: https://user-images.githubusercontent.com/14288520/210425961-e0048063-dcfd-4c8c-b1d3-153b9e956a72.png
  :target: https://user-images.githubusercontent.com/14288520/210425961-e0048063-dcfd-4c8c-b1d3-153b9e956a72.png

Outputs
-------

This node has the following outputs:

* **Curves**. The projected curves (in 3D space).
* **TrimCurves**. Curves in U/V parameter space of the surface, which
  correspond to the projected curves. These can be used as trimming curves, for
  example, for "Tessellate & Trim" node.

.. image:: https://user-images.githubusercontent.com/14288520/210426571-a964981e-0ae2-439a-93d6-e7cd661ca965.png
  :target: https://user-images.githubusercontent.com/14288520/210426571-a964981e-0ae2-439a-93d6-e7cd661ca965.png

Example of Usage
----------------

Project several Circles onto a Surface generated by lofting between three NURBS curves:

.. image:: https://user-images.githubusercontent.com/284644/92305855-6e27d280-efa4-11ea-8309-a78bb9c7e152.png
  :target: https://user-images.githubusercontent.com/284644/92305855-6e27d280-efa4-11ea-8309-a78bb9c7e152.png

Replay with new nodes:

.. image:: https://user-images.githubusercontent.com/14288520/210429481-78646f61-c9ec-4d83-a011-67d13492a93a.png
  :target: https://user-images.githubusercontent.com/14288520/210429481-78646f61-c9ec-4d83-a011-67d13492a93a.png

* Generator-> :doc:`Segment </nodes/generator/segment>`
* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Surfaces-> :doc:`NURBS Loft </nodes/surface/nurbs_loft>`
* Surfaces-> :doc:`Evaluate Surface </nodes/surface/evaluate_surface>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
* Scene-> :doc:`NURBS Input </nodes/exchange/nurbs_in>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`