File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/gh/diffCheck/diffCheck Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -242,21 +242,26 @@ def to_mesh(self):
242242 """
243243 Convert the beam to a Rhino Mesh object
244244 """
245+
245246 # mesh = rg.Mesh()
246247 o_side_faces = [f .to_brep_face () for f in self .side_faces ]
247248 o_joint_faces = [f .to_brep_face () for f in self .joint_faces ]
248249 rhino_brep_faces = o_side_faces + o_joint_faces
249250
250- brep = rg .Brep ()
251+ new_faces = []
252+ mesh = rg .Mesh ()
251253
252254 for f in rhino_brep_faces :
255+ new_faces .append (f .DuplicateFace ())
256+
257+ for f in new_faces :
253258 #from dfbeam face to mesh
254- brep .Faces .Add (f )
255- # mesh_part = rg.CreateFromBrep(face.ToBrep() , rg.MeshingParameters.Coarse)
256- # mesh.Append(mesh_part)
257- # mesh.Compact()
259+ # brep.Faces.Add(f)
260+ mesh_part = rg .Mesh . CreateFromBrep (f , rg .MeshingParameters .Coarse )
261+ mesh .Append (mesh_part )
262+ mesh .Compact ()
258263
259- return rhino_brep_faces
264+ return mesh
260265
261266 def __repr__ (self ):
262267 return f"Beam: { self .name } , Faces: { len (self .faces )} "
You can’t perform that action at this time.
0 commit comments