Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to create a Surface on an orphan mesh

Status
Not open for further replies.

danb3

Mechanical
Jun 21, 2021
8
Hi all,

I have a part that is an Orphan Mesh, and I am writing a python script that creates a Surface on the part. In CAE this is very easy, I can just select the regions for the surface by angle, which selects all of the element faces for me and creates a Surface.

I am trying to replicate this in the script, using 'getElemFacesByFaceAngle', which seems to do a similar thing. However I am struggling to then use this as an input then into the Surface method, which asks for the 6 different element faces(face1Elements, face2Elements etc...). I can then go and loop through all the faces returned by 'getElemFacesByFaceAngle' and find which face they relate to and build the six different face sequences, but this is very slow.

Is there an easier way to use the results of 'getElemFacesByFaceAngle' with the Surface method?

Thanks in advance.
 
Replies continue below

Recommended for you

Check the FaceFromElementFaces(…) method. But if you want to convert the whole orphan mesh to geometry, you can use the 3D Mesh to Geometry Plugin.
 
Hi FEA way,

Thanks for your response. I don't need to create any geometry from the mesh, I just want a surface defined that I can then apply loads to. Is there an easy way to use the element face objects returned by getElemFacesByFaceAngle to create a surface?
 
You should be able to define side1Faces. Check what it looks like in the .rpy file and try modifying that syntax.
 
FEA way,

Sorry I should've been more specific, this is for solid elements. The Surface(...) method asks for the 6 different element faces (face1Elements, face2Elements etc...), the problem is that this is not what getElemFacesByFaceAngle(...) returns. So I am after an easy way to use the output of getElemFacesByFaceAngle(...) with Surface(...).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor