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

    shirazbj

    @shirazbj

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

    shirazbj Unfollow Follow
    registered-users

    Latest posts made by shirazbj

    • RE: Ruby "split" in file line reading

      Heard of regular expressions before, This time I tried to understand it. Thanks.

      posted in Developers' Forum
      S
      shirazbj
    • RE: Enums's index of an inputbox return

      all good now.

      I'll download the ruby book.

      Thanks dan.

      posted in Developers' Forum
      S
      shirazbj
    • Ruby "split" in file line reading

      hi,

      I used to use:
      b = file.gets()
      c=b.split(" ")
      to read lines from a data file in text.

      but the following lines doesn't have a " " between two data if the value is negative.

      0.208646094863E+000-0.513313617099E-001-0.915625940530E-003 0.180604789668E+000-0.240882759294E-001-0.872767876563E-003

      How do I split them now?

      Thanks in advance

      Cean

      posted in Developers' Forum
      S
      shirazbj
    • Enums's index of an inputbox return

      hi,

      I was wondering if I could get the index of an enums selection directly.

      In my example below, I want to choose between "2D" & "3D" for one variable. The return is either "2D" or "3D". But I want the index number instead, that is "0" for "2D", "1" for "3D".

      How could I get the "0" or "1" if I don't compare the return with the list of the enums.

      Thanks in advance

      Cean

      def hw_inputbox
      	
        iaxi=1	
        t_iaxi = ["2D","3D"]
        enums = [t_iaxi.join("|")]
        values = [t_iaxi[iaxi]]
        prompts = ["Geo type; "]
        results = inputbox prompts, values, enums, "my Geo"
        return nil if not results 
        $iaxi = results[0]
        your_slection=$iaxi
        UI.messagebox(your_slection)
      
      end
      
      UI.menu("Plugins").add_item("hw_inputbox") { hw_inputbox }
      
      posted in Developers' Forum
      S
      shirazbj
    • RE: Color in add_line?

      Found this:

      Edge color by material
      http://forums.sketchucation.com/viewtopic.php?f=180&t=35443#p312624

      thx

      posted in Developers' Forum
      S
      shirazbj
    • Color in add_line?

      Hi,

      How do I add an color line?

      I use face.material="red" to change face color, but line.material doesn't work.

      Thanks in advance

      Cean

      posted in Developers' Forum
      S
      shirazbj
    • RE: UI.openpanel - wildcard bug

      I tried "a.jpg".

      Why ".jpg" is not listed in the "files of type"?

      posted in Developers' Forum
      S
      shirazbj
    • A Transformation demo

      hi,

      I want to generate component in anywhere with any angle upon my need.

      I come up with this code. Now the angle is only about Z axis.

      Any advice is welcomed.

      Thanks for Matin's wonderful tutorial http://www.martinrinehart.com/models/tutorial


      transformation

      posted in Developers' Forum
      S
      shirazbj
    • RE: Compute Rotation and Scale from Transform Object

      @martinrinehart said:

      @dburdick said:

      I read your wonderful web-page description of the 4 x 4 matrix - ...

      I am reading it too. Great job.Thanks.

      posted in Developers' Forum
      S
      shirazbj
    • RE: An U bolt

      I read your PipeAlongPath code. I'm not using pre-selected path, instead generating by add_line+add_circle+add_line for U.

      add_circle return an array of edge, I need to include them into the path array.

      it works now (attached).

      Thanks


      draw a u-bolt

      posted in Developers' Forum
      S
      shirazbj