![]() #esel=EdgeSelection.Create(edge) #Uncomment these lines to see the linesĮdge_dihedral_max,edge_dihedral_min=dihedral_maxmin(edge,problems=problems) ![]() ![]() Print_edges=1 #If only edges are picked, then print the dihedralsĮlif current_selection.FilterBodies().Count!=0:Ĭurrent_bodies=current_selection.FilterBodies()Ĭheck_edges=current_bodies.ConvertToEdges()Įlif current_selection.FilterComponents().Count!=0:īodies=BodySelection.Create(GetRootPart().GetAllBodies()) If current_selection.FilterFaces().Count!=0:Ĭurrent_faces=current_selection.FilterFaces()Ĭheck_edges=current_faces.ConvertToEdges()Įlif current_selection.FilterEdges().Count!=0:Ĭheck_edges=current_selection.ConvertToEdges() #Check current selection for geometry types. #faces=Selection.CreateByObjects(.Faces.GetConnection(0)]) #Algorithm to get the interior curves of the current surface patch Print("Normal has zero length at ratio %4.2f"%ratio,n1,n2) #print("AgainAgain",dot,lenSq1,lenSq2,rads,angle)ĭef dihedral_maxmin(edge,numevals=numpoints,problems=):įor ratio in : #print("Normal has zero length",lenSq1,lenSq2) #Selecting edges, or rerunning script with edges selected will also print the values.ĭot = x1*x2 + y1*y2 + z1*z2 #between and Print_edges=0 #Change to 1 to print max,min dihedral values for all non-tangent edges Numpoints=10 #Number of of curve evaluation points Minimum_angle_cutoff=0 #1e-3 #Curves with a maximum angle smaller than this will not be selected. Maximum_angle_cutoff=25 #Curves with a minimum angle larger than this will not be selected. # Phoenix Analysis and Design technologies # Select the geometry to check and then run the script ![]() Only edges with a minimum dihedral below the cutoff angle will be selected. Since we would also have many edges that we already know are not tangent, like 90° angles, the script includes a cutoff angle of 40°. The script checks the dihedral value of each edge and returns the active set of the non-tangent edges. After checking the current scripting API and realizing that the dihedral calculation is not yet available, I wrote my own. This works great for a few edges, but checking the whole model would be quite tedious.
0 Comments
Leave a Reply. |