sketchucation logo sketchucation
    • Login
    1. Home
    2. wdbao
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    W
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 19
    • Groups 1

    wdbao

    @wdbao

    10
    Reputation
    1
    Profile views
    19
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    wdbao Unfollow Follow
    registered-users

    Latest posts made by wdbao

    • RE: Ruby Version for Sketchup 8.0 M1 on Mac ??

      @dan rathbun said:

      @wdbao said:

      i try to use CSV class, but it fails.

      See this post: http://forums.sketchucation.com/viewtopic.php?f=180&t=34381&p=302974#p302974

      Thanks again! Dan!
      you are a very good helper. and fast.
      you have showed me this load path code before. i just couldn't understand it fully then. now with more ruby reading, it all make sense to me.
      it feels great to be in a such nice community.
      i will keep read on.

      posted in Developers' Forum
      W
      wdbao
    • RE: Ruby Version for Sketchup 8.0 M1 on Mac ??

      i want to extend the build_in sketchup interpreter too.
      from the release note post by google here http://cfcl.com/twiki/bin/view/Projects/SketchUp/RE_Library_Use
      Su 8.0 on pc has a 1.8.6 and a 1.8.5 on mac
      the new 8.0 M1 release note says nothing about the ruby version. so i assume it is still the same.
      here http://cfcl.com/twiki/bin/view/Projects/SketchUp/RE_Library_Use
      Main.RichMorin post sth interesting. He also try to extend ruby inside su to other parts of the library, gems, etc.
      it semms that he hasn't work it out yet.
      but it's worth a try.
      and i hope some gurus follow this path and somebody find a way eventually
      note that even on pc it is 1.8.6 all right, but it has very limited access to the standard library and gems.
      i try to use CSV class, but it fails.

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      @dan rathbun said:

      @wdbao said:

      but i want to parse the data into hash.
      then i can access the data in a natural way.

      OK posted a second example that outputs record Hashes, same thread.
      [code] reading a CSV file

      Dan, you are marvellous! this will do.

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      thanks again.
      it is not a question.
      your help is greatly appreciated.
      the example code you posted is good for separating the header.
      but i want to parse the data into hash.
      then i can access the data in a natural way.

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      @dan rathbun said:

      To talk more about your CSV File question, I thought TIG posted an example here somewhere on the forums.

      It's not that hard.
      As each line of the file is read ( f = file.readline ) the var contains a string, so you'd use the String method .split and specify the character to split by.
      record = f.split(',')
      At that point the var record is an Array of String values.

      It's up to you if you wish to convert each record to Ruby data, line by line; or just collect an Array of record Arrays, close the file, then do your conversions all at once with a nested loop.

      thanks Dan
      it is easy to get the data on csv file this way. or any other files

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      i mean CSV library as one of the Ruby Standard Library
      http://forums.sketchucation.com/viewtopic.php?f=180&t=29544&start=0&hilit=ruby+library

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      it seems to me that Sketchup Ruby API don't have the CSV library.
      should i just use the File class
      or should i add the csv module to it
      and how?

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      @minguinhirigue said:

      wdbao, any improvment in this big project of yours ?

      progress has been slow
      now i still looking for ways to read csv files from inside the ruby script
      and make use of the data in csv files

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      @chrisglasier said:

      Also for the Ruby part see Automatic Sketchup which is reviewed in this topic.

      been busy with a lot of stuff
      now i am reading the automatic sketchup, since the author make the pdf file public.
      it's a really great work.
      and only now i truely understand the important of hirarchy chris have told me about.

      posted in Developers' Forum
      W
      wdbao
    • RE: Can i draw the whole building structure with code?

      I am actually glad you move this into public discussion
      if not boring you, i want to introduce myself more for better understanding:
      i am one of the only two college graduates in my small company and the other one hate English.
      so i am all alone on this.
      and i don't really have a lot of free time. Now i just work as a ordinary builder(one of the construction crews ). so a lot of hard labour and working overtime.
      But i still have a strong desire to learn new things.
      now i just put my original ideas on the table when i have a little free time.
      no more thorough thoughts,
      cause as times move on, i can never keep up with chris on this discussion.
      my original ideas are simply.
      i just want to model the whole building(mainly structural parts) with ruby codes.using scripts i can kill all the boring repeated modelling job once in all. Cause the main components in a concrete structure( the main building structure here in china), like reinforced columns, beams and slabs, are very similar in nature. they all follow some regional Coding( we have our Chinese Designing Coding for concrete) which can be totally represent in scripting codes. and then i can get the information which set the particularity of each component in a special project from the design institute( i am looking this at a construction standpoint).For example, a table of column which contain all the information about columns in a project.
      so it is all set. all i need to do is write the script which respect the Designing Code once, and make sure the data from design institute are readable for my script.
      When i get my model in sketchup for my project. there are three main things i want to do ( Chris, you are right. I really want to "be able to incorporate your research into your day to day work ")
      First, I can use this model to detect any problem before construction from the blueprint passed from the design institute. I believe they call it Collision Detection.
      Second, I can import this model into Synchro or Virtual Builder for construction Management.
      Third, I can use this model to illustrate some construction process.

      I had never been involved with complex data in programming or building design which you need " 3D spreadsheets". Chris, sorry that i still can't fully understand your way of handling complex data. why not just more columns? and information about components are not just 3 dimensionals. Just adding the timeline
      it will turn into 4D.

      i am working in a residential construction site. the structure is simple. so my original idea is to have two different models. One represent the design, one for the building actually constructed. you know for future comparison. and the data of different component are in separate spreadsheet in excel. My starting point is from Piling foundation. I have already have data on spreadsheets which contain the information about the pressed piles, like the actually length, diameter, the date constructed and so on. this is actually a construction record which i asked another college to put it into computer. and i have another file which contain all the coordinate of the piles. originally i use this mainly for surveying and setting out using total station. with this two i think i can construct the piles in sketchup. But i haven't finish the script yet. cause i need to finish my ruby tutorial first and i have some structural analysis to do.
      i think i all i need is a csv reader and the code using this data to form the geometry in sketchup.

      About the nameset. Chris, i download the file. but i don't think it working properly for me. or it just a hmtl problem of my browser. all i see is sth like Cgscsene which helps me to navigate the scene. i didn't see sth like Figure 3 or Figure 4 in your Essay. Never mind, i have read your essay about nameset.
      i believe your main purpose is organize "information that is assembled to direct a physical outcome". I think it's great idea. It really blow my mind. i never think that the information around building can be organize in such a way.
      But i think you need to form a whole new workflow to implement your ideas. i have read some articles about BIM. i think all those new solution is really good for different aspects of the design team to better understanding each other and limiting errors. But they haven't form a good workflow. the old paper oriented method did have its merits. Like some other BIM system, your nameset treat all the information as a unity. But in the specific step of the construction process, we just need a fraction of the information. Like in the setting out stage, we just need one or a few paper to set the position. i know we can extract that part of the information. But that would lead us back into the old workflow. what i mean is we need to consider the overall workflow.

      posted in Developers' Forum
      W
      wdbao