File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/compas_rhino/conversions Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1212from ._primitives import point_to_compas
1313
1414from ._geometry import RhinoGeometry
15+ from ._exceptions import ConversionError
1516
1617
1718class RhinoSurface (RhinoGeometry ):
@@ -46,13 +47,18 @@ def to_compas(self):
4647 Returns
4748 -------
4849 :class:`compas_rhino.geometry.RhinoNurbsSurface`
50+
51+ Raises
52+ ------
53+ :class:`ConversionError`
54+ If the surface BRep contains more than one face.
4955 """
5056 from compas .geometry import NurbsSurface
5157
5258 brep = Rhino .Geometry .Brep .TryConvertBrep (self .geometry )
5359 surface = NurbsSurface ()
5460 if brep .Surfaces .Count > 1 :
55- raise Exception ('Conversion of a BRep with multiple underlying surface is currently not supported.' )
61+ raise ConversionError ('Conversion of a BRep with multiple underlying surface is currently not supported.' )
5662 for geometry in brep .Surfaces :
5763 surface .rhino_surface = geometry
5864 break
You can’t perform that action at this time.
0 commit comments