---
title: "CadRay constructor"
url: "https://reference.aspose.com/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cadray/__init__/"
product: "Aspose.CAD for Python via .NET API References"
---


## __init__ {#aspose.cad.fileformats.cad.cadobjects.Cad3DPoint-aspose.cad.fileformats.cad.cadobjects.Cad3DPoint}

Initializes a new instance of the [`CadRay`](/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cadray) class.



```python
def __init__(self, first_point, unit_direction_vector):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| first_point | [`Cad3DPoint`](/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cad3dpoint) | First point. |
| unit_direction_vector | [`Cad3DPoint`](/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cad3dpoint) | Unit direction vector. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentNullException | Thrown when one of arguments is null |





### See Also
* module [`aspose.cad.fileformats.cad.cadobjects`](../../)
* class [`CadRay`](/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cadray)
