- http://prspkt.ru, http://prspkt.home.blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hou | |
| import random | |
| color1 = hou.Color((0.0, 0.0, 0.0)) # black | |
| color2 = hou.Color((1.0, 0.0, 0.0)) # red | |
| color3 = hou.Color((0.2, 0.2, 0.2)) # gray | |
| node = hou.selectedNodes()[0] | |
| geo_node_path = "/obj/" + str(node.parent()) | |
| geo_node = hou.node(geo_node_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| public class Test | |
| { | |
| public static void Main() | |
| { | |
| Console.WriteLine(ConvertToRanges("1,2,3,4,8,9,10,15")); | |
| Console.WriteLine(ConvertToRanges("5,6,7,9,10,11,12,15,16")); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // FUNCTIONS | |
| void removedups(int pts[]) | |
| { | |
| int end=len(pts); | |
| int ct1=0, ct2; | |
| while(ct1<end) | |
| { | |
| ct2=ct1+1; | |
| while(ct2<end) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void groupAudit() | |
| { | |
| Document doc = this.ActiveUIDocument.Document; | |
| List<Group> groups = new FilteredElementCollector(doc).OfClass(typeof(Group)).Cast<Group>().ToList(); | |
| List<GroupType> groupTypes = new FilteredElementCollector(doc).OfClass(typeof(GroupType)).Cast<GroupType>().ToList(); | |
| List<Tuple<string, int, int>> groupData = new List<Tuple<string, int, int>>(); | |
| // using (StreamWriter sw = new StreamWriter(@"C:\Users\harry_000\Desktop\RTC_EUR_2015-2015-10-28\RTC EUR 2015\Advanced API\\output.txt")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void topoFromSdrFile() | |
| { | |
| Document doc = this.ActiveUIDocument.Document; | |
| List<XYZ> points = new List<XYZ>(); | |
| using (StreamReader sr = new StreamReader(@"C:\Users\harry_000\Desktop\USPS-Eville.sdr")) | |
| { | |
| string line = ""; | |
| while ((line = sr.ReadLine()) != null) | |
| { | |
| if (line.Contains("-") || line.Contains(":")) |