![]() tVisibility(model.getEntities(3),0) # turn volumes off # if there is an intersection, do what you want to do.įactory.remove(intersect, True) # remove created intersection objects Intersect = factory.intersect(,, removeObject=False, removeTool=False) # creates an object if there is an intesection With removeObject, removeTool as False, this # ("General.Terminal", 1) # can be useful ("Mesh.CharacteristicLengthMax", 0.2) # max mesh size ![]() From there you can either give yourself a warning, or remove the intersections etc.Īn example python script: import gmsh # Download gmsh.py, and libgmsh files from gmsh-sdk If there are volumes created by intersection, you have an intersection. My solution involves computing the intersection (with removeObject=False, removeTool=False), then finding the length of the returned list. I've been using python, the documentation in the source files is fairly clear, as well as the numerous demos.īecause its in python, you can count entities easily using commands like: len(model.getEntities(3)) # returns number of volume entities I don't think you can count intersections before doing the intersection, but you can remove the objects that are created by the intersection after getting information by using the GMSH API ( download here "SDK"). So, my question is: Is it possible to detect interstions in gmsh before actually perform the intersections? Is it possible to count the number of volumes (I guess yes)? Anyway, I will need to be able to count the number of volumes before and after, which I haven't seen anything like in the gmsh documentation. But I'm not very happy with this solution. If there are more than before, there is an intersection. Other option, but slower, is to try the intersection command (not deleting any of the original volumes) and check how many volumes are after the intersection. I tried to use those commands in the GUI, but I couldn't find them. But I'm not sure how they work (the documentation does not explain what happens when there are no boundaries). I saw there are some commands like Boundary, PointsOf and CombinedBoundary which seems to retrieve the entities on the boundaries. Ideally, it will be nice to have a command which checks the boundaries. They should not touch each other, therefore I need to check if the volume I'm introducing intersect with any of the volumes I introduced before. I want to implement an algorithm to introduce spheres (later it will be any type of volume) in a cube. I tried with extruding the surface mesh along the normals to create a boundary layer with prisms but this creates conflicts of advancing fronts at the intersection between the wing and the fuselage (in the part after the ogive) and does not give me enough points in the viscous layer.I'm considering to use gmsh as replacement of Ansys mesher (obviating there is not mesh file type compatibility for Workbench/APDL). I need to create a manual boundary layer from the surface so I would need to have transfinite recombined.ģ. I tried the Built In engine + surface filling but I was not getting the surface I wantĢ. If I extrude the line to create the ogive by asking to extrude the mesh, I get a structured mesh in the ogive, but this prevents me to apply the transfinite on the cylindrical surface adjacent to the ogive.ġ. Error : Surface 1 is transfinite but has 1 holes While trying to create a transfinite recombined mesh over it I get the error message: This ogive is created by extruding by revolution around its longitudinal axis. I am using the OCC engine: I need it since I must use the boolean operation to create the root of the biconvex wing along the cylindrical fuselage. I need to manually create a BL for a vehicle with the nose modelled as an ogive (Bedford Wing and Body)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |