File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/compas_rhino/geometry/brep Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010### Added
1111
12+ * Added support for ` .stp ` file extension in addition to ` .step ` for ` RhinoBrep.from_step() ` and ` RhinoBrep.to_step() ` methods.
13+
1214### Changed
1315
1416* Updated minimum library version to ` 2.14.1 ` in Rhino8 GH components.
Original file line number Diff line number Diff line change @@ -749,8 +749,8 @@ def from_step(cls, filepath):
749749 :class:`compas_rhino.geometry.RhinoBrep`
750750
751751 """
752- if not filepath .endswith (".step" ):
753- raise ValueError ("Expected file with .step extension" )
752+ if not ( filepath .endswith (".step" ) or filepath . endswith ( ".stp" ) ):
753+ raise ValueError ("Expected file with .step or .stp extension" )
754754 return _import_brep_from_file (filepath )
755755
756756 @classmethod
@@ -891,7 +891,7 @@ def to_viewmesh(self, linear_deflection: float = 0.001):
891891 return _join_meshes (self .to_meshes ()), []
892892
893893 def to_step (self , filepath ):
894- if not filepath .endswith (".step" ):
894+ if not ( filepath .endswith (".step" ) or filepath . endswith ( ".stp" ) ):
895895 raise ValueError ("Attempted to export STEP but file ends with {} extension" .format (filepath .split ("." )[- 1 ]))
896896 _export_brep_to_file (self ._brep , filepath )
897897
You can’t perform that action at this time.
0 commit comments