File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
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 ` .brep ` files for easier exchange with OCC geometries.
13+
1214### Changed
1315
1416### Removed
Original file line number Diff line number Diff line change @@ -139,21 +139,23 @@ def from_step(cls, filepath: str) -> "Model":
139139
140140 @classmethod
141141 def from_brep (cls , brep : Brep ) -> "Model" :
142- """Construct a model from a Brep .
142+ """Construct a model from a b-rep geometry .
143143
144144 Parameters
145145 ----------
146146 brep : :class:`Brep`
147- The brep geometry.
147+ The b-rep geometry.
148148
149149 Returns
150150 -------
151151 :class:`Model`
152152
153153 """
154- _ , filepath = tempfile .mkstemp (suffix = ".stp" )
155- brep .to_step (filepath )
156- return cls .from_step (filepath )
154+ fd , filepath = tempfile .mkstemp (suffix = ".brep" )
155+ brep .to_brep (filepath ) # type: ignore
156+ model = cls ()
157+ gmsh .open (filepath )
158+ return model
157159
158160 # ==============================================================================
159161 # Model entities
You can’t perform that action at this time.
0 commit comments