compas_point_from_occ_point2d

compas_occ.conversions.compas_point_from_occ_point2d(point: OCC.Core.gp.gp_Pnt2d, cls: Optional[Type[compas.geometry.point.Point]] = None) compas.geometry.point.Point

Construct a COMPAS point from an OCC 2D point.

Parameters
pointgp_Pnt2d

The OCC point.

clsType[Point], optional

The type of COMPAS point.

Returns
Point

Examples

>>> from OCC.Core.gp import gp_Pnt2d
>>> from compas_occ.conversions import compas_point_from_occ_point2d
>>> point = gp_Pnt2d(0, 0)
>>> compas_point_from_occ_point2d(point)
Point(0.0, 0.0, z=0.0)