|
[Sponsors] |
April 24, 2020, 08:59 |
Create 3dpoints on selected face
|
#1 |
New Member
shubham
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
Hello Everyone,
I want to create a 3dpoints on selected face. I tried to select the face but not able to create the 3d points on it. Purpose of this script is to measure the thickness at particular location. if anyone knows the solution please help me def main(): types = ['FACE'] entity = base.SelectEntitiesList(deck, types) print('Selected entity ', entity._id) Thanks and Regards, Shubham |
|
April 27, 2020, 05:45 |
|
#2 |
New Member
shubham
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
If any one knows answer, Please reply
|
|
April 28, 2020, 02:53 |
|
#3 |
Member
Maries
Join Date: Mar 2010
Location: Cologne, Germany
Posts: 75
Rep Power: 16 |
do you have another point to project on the surface.? Surface is big area. At which point in the surface do you want to create point. Need one more input.
|
|
April 29, 2020, 05:31 |
|
#4 |
New Member
shubham
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
I don't want to project the existing point, but just like 'Weld Spot' function i want to create a points on a face. But i am not able to create the co ordinates of that points, just by clicking on face.
def main(): face = base.GetEntity(base.CurrentDeck(), 'FACE', 63046) coords = [] coords.append([2688.54, -353.579, 13.3602]) coords.append([2724.17, -331.047, 13.1536]) coords.append([2779.36, -313.861, 12.4984]) coords.append([2833.71, -323.72, 11.4548]) coords.append([2851.94, -338.252, 11.0163]) coords.append([2861.41, -347.123, 10.7709]) ret = base.HotPointsWeldSpot(face, coords, False, True) print(ret) Thank you. |
|
April 29, 2020, 06:10 |
|
#5 |
Member
Maries
Join Date: Mar 2010
Location: Cologne, Germany
Posts: 75
Rep Power: 16 |
Use True for produce3dpoint parameter like below. It is working.
base.HotPointsWeldSpot(face, coords, True, True) It was clearly mentioned in the help where you copied the above example. ansa.base.HotPointsWeldSpot(face, coordinates, produce3dpoint, ret_ents) |
|
May 6, 2020, 23:31 |
|
#6 |
New Member
shubham
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
Thank you for your reply,
now my next concern is how to get the coordinates of projected points on surface, I had tried this but not working. I dont know how to use base.Entity function def main(): # Selects faces and create points ent_types = ("FACE") entities1 = base.PickEntities(deck, ent_types) print((entities1)) types = ['FACE'] entity = base.SelectEntitiesList(deck, types) print('Selected entity ', entity._id) face = base.GetEntity(deck,'FACE',entity._id) print(face) all_coordinates = base.PickPointOnSurface(entities1) print(all_coordinates) print(type(all_coordinates)) base.HotPointsWeldSpot(face, all_coordinates, True, True) #Project the points ent_types = ("FACE") entities2 = base.PickEntities(deck, ent_types) projected_points = [] for coordinates in all_coordinates: projected_points.append(base.HotPointsProject(coor dinates[0],coordinates[1], coordinates[2], entities2)) base.All() print(projected_points) collect_point = [] for coordinates2 in projected_points: collect_point.append(base.Entity(deck,coordinates2 ._id,'HOT POINTs','position')) print(collect_point) |
|
May 9, 2020, 05:44 |
|
#7 |
New Member
shubham
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
If any one having answer to this please reply.
Thank you |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Error in mesh writing | helios | ANSYS Meshing & Geometry | 21 | August 19, 2021 14:18 |
OpenFoam "Permission denied" and "command not found" problems. | iyidaniel@yahoo.co.uk | OpenFOAM Running, Solving & CFD | 11 | January 2, 2018 06:47 |
Simulating fire in a tunnel | luca1992 | OpenFOAM | 14 | August 16, 2017 13:50 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 10:56 |
gmsh2ToFoam | sarajags_89 | OpenFOAM | 0 | November 24, 2009 22:50 |