File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
src/compas_rhino/conversions Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5151* Fixed ` compas_blender.artists.VolMeshArtist.draw ` and ` compas_blender.artists.VolMeshArtist.draw_cells ` .
5252* Fixed ` compas_ghpython.artists.VolMeshArtist.draw ` and ` compas_ghpython.artists.VolMeshArtist.draw_cells ` .
5353* Fixed ` compas_rhino.artists.VolMeshArtist.draw ` and ` compas_rhino.artists.VolMeshArtist.draw_cells ` .
54+ * Fixed bug in ` compas_rhino.conversions.RhinoCurve.to_compas ` .
55+ * Fixed bug in ` compas_rhino.conversions.RhinoSurface.to_compas ` .
5456
5557### Removed
5658
Original file line number Diff line number Diff line change @@ -60,9 +60,8 @@ def to_compas(self):
6060 -------
6161 :class:`~compas_rhino.geometry.RhinoNurbsCurve`
6262 """
63- from compas .geometry import NurbsCurve
64- curve = NurbsCurve ()
65- curve .rhino_curve = self .geometry
63+ from compas_rhino .geometry import RhinoNurbsCurve
64+ curve = RhinoNurbsCurve .from_rhino (self .geometry )
6665 return curve
6766
6867 def to_compas_circle (self ):
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ def geometry(self, geometry):
3535 ------
3636 :class:`ConversionError`
3737 If the geometry cannot be converted to a surface.
38+
3839 """
3940 if not isinstance (geometry , Rhino .Geometry .Surface ):
4041 if not isinstance (geometry , Rhino .Geometry .Brep ):
@@ -52,17 +53,15 @@ def to_compas(self):
5253 ------
5354 :class:`ConversionError`
5455 If the surface BRep contains more than one face.
56+
5557 """
56- from compas .geometry import NurbsSurface
58+ from compas_rhino .geometry import RhinoNurbsSurface
5759
5860 brep = Rhino .Geometry .Brep .TryConvertBrep (self .geometry )
59- surface = NurbsSurface ()
6061 if brep .Surfaces .Count > 1 :
6162 raise ConversionError ('Conversion of a BRep with multiple underlying surface is currently not supported.' )
6263 for geometry in brep .Surfaces :
63- surface .rhino_surface = geometry
64- break
65- return surface
64+ return RhinoNurbsSurface .from_rhino (geometry )
6665
6766 def to_compas_mesh (self , cls = None , facefilter = None , cleanup = False ):
6867 """Convert the surface b-rep loops to a COMPAS mesh.
You can’t perform that action at this time.
0 commit comments