sketchucation logo sketchucation
    • Login
    1. Home
    2. jolran
    3. Posts
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 37
    • Posts 1,027
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: SketchUp RUBY API Wishlist [way of coding wishes, please]

      +1

      But also ability to remove polygons. If I'm not misstaken one can only add polygons(?).
      (This was under discussion before)

      It would be convienient to use polygonmesh as container at an early stage. Rather as a last step before becoming Sketchup geometry..

      Transforms are ~3 times faster (due to indexing?) than transforming required n_points directly as well. Although that can be simulated with a Class.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      Wow, this topic is moving fast now. ๐Ÿ˜„

      Ok, so it's cubic 4 X 4 Bezier Patch. (As can be seen).

      The idea I had was to conform my surfaces(from the node editor) to be valid with your nice editing possibilities after baked down to Sketchup.

      I've built a simple translation-Gizmo for moving points(must have that at least) but your editing abilities are way more advanced. More than I would need actually in my GUI, since mostly dependent on parameter values..

      This would be at a later stage anyway. There is still plenty of Math to deal with ๐Ÿ˜„

      In all case.
      Congratulations to this version! The Gizmo is spectacular. ๐Ÿ‘

      BTW
      I don't know if you are gonna continue updating this plugin, since focus is on the subdivision pligin. But if you do and stay with Beziers, have you had a look at the power basis forms ? I studied them a little before since easier to grasp.
      They are used a lot in gamers code.

      They should perform better.
      It's also possible to have other degree curves with different matrix.
      For example a 3 X 3 Patch with degree 2 Power basis.
      Although the @last Bezier code base the degree on n_points so that should be the same.. ?
      (this is for a curve)

      #                      โ”Œ            โ”   โ”Œ    โ”
      #                      โ”‚ โˆ’1  3 โˆ’3 1 โ”‚   โ”‚ P1 โ”‚     MATRIX FORM for Cubic Bezier with 4 controlpoints.
      # P(t) = [tยณ tยฒ t 1] ยท โ”‚  3 โˆ’6  3 0 โ”‚ . โ”‚ P2 โ”‚
      #                      โ”‚ โˆ’3  3  0 0 โ”‚   โ”‚ P3 โ”‚
      #                      โ”‚  1  0  0 0 โ”‚   โ”‚ P3 โ”‚
      #                      โ””            โ”˜   โ””    โ”˜
      #
      # t = interval-value between 0 and 1. t2 = t*t, t3 = t2*t 
      # For even greater efficiency a,b,c,t3 coefficients could be cached and reused,
      # and updated when interval/subd changes.
      #
      def power_basis(t3,t2,t, p0, p1, p2, p3)
      
      	# Calculate 4 coefficients (MATRIX T*U) where 4th coefficient is simply reusing t3
      	a = t3*(-1) + t2*3    + t*(-3) + 1
      	b = t3*3    + t2*(-6) + t*3 
      	c = t3*(-3) + t2*3 
      
      	# Calculate Points coordinates (MATRIX U*V)
      	x = a*p0.x + b*p1.x + c*p2.x + t3*p3.x
          y = a*p0.y + b*p1.y + c*p2.y + t3*p3.y
          z = a*p0.z + b*p1.z + c*p2.z + t3*p3.z
      	
      	return Geom;;Point3d.new(x,y,z) # Return 1 point from interpolation
      
      end
      
      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      @unknownuser said:

      I'll mainly focus on my subdivision extension over this one

      I understand.

      @unknownuser said:

      Btw, I have a fix for the compatibility bug with SU2013 and older. I'll be pushing an update.

      ๐Ÿ‘

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      @unknownuser said:

      Yes
      For 2013 or 8 user
      just change that like this

      "file = FILE"

      Like I said, better let Thomthom do it properly. Even if it looks like a simple fix, it "may" have consequences for TT_lib since removing encoding.
      Although, nothing "bad" should happend if you only experiment at 1 place..

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      @unknownuser said:

      but.. it says su8 is supported..

      Ah, yeah you are right. Then I guess he just probably forgot to set up some conditions for Su8. Well see when he get's back.
      Meanwhile do a testspin in 2014. ๐Ÿ˜„

      It may have be a condition set on line 26 in the loader rb
      "file = FILE.dup.force_encoding("UTF-8")"

      If I remember correctly Ruby 1.8 (Su8) does not have that method..

      I'm not gonna mess with that since I don't know how he has things set up with TT_Lib so I suggest waiting for his return..

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      @unknownuser said:

      it looks super nice thank you but it doesn't work for me (sketchup 8 on win7)

      Same here. I only had it working in 2014.

      Error "defined method `force_encoding' for #String:0xb10993c"

      This is "probably" and Ruby 1.8 error. I have the impression that many authors will stop supporting SU 8 soon.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      No worries ๐Ÿ˜„ Nice chest.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      Yes I noticed that. But Tripatch ?
      edit: ah, it may not be included yet. There are some things not added in this version.
      Doesent matter. Bloody marvelous anyway ๐Ÿ‘

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      Some really nice editing capabilities there, with the Gizmo and all. WOW! ๐Ÿ˜ฒ

      So you decided to release it non commersial, huh ?

      For some time now I have been working on curves and surfaces for my node editor, maybe
      I can try making it compatible with you patches as well, now that your code is in public...
      That would be cool to use your tools after baking down geometry..

      Do you use Knotvectors for the patches ? Or are they interval-based type powerbasis functions ?
      Edit: Ah right, they are not spline-based, (duh). So you go through the C-extensioncode right ?

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin][WIP][OpenSource] Bezier Surface

      This is so cool!
      I'm not gonna get any work done now playing with this ๐Ÿ˜„

      How do you add Tripatch to Qaudpatch ? Possible ?

      posted in Plugins
      jolranJ
      jolran
    • RE: WebDialog parameters passed to callback cause .to_l error

      Guys ๐Ÿ‘

      This place is a great source of information.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: WebDialog parameters passed to callback cause .to_l error

      heh ๐Ÿ˜„ yeah that works to.

      Don't know if it's prettier than a gsub, but if it works..

      Does the code pass through transparently if no errors, or does this add overhead?

      It might be interesting to do a speed comparing against gsub variant.

      @unknownuser said:

      But obviously it would be better to write a method to handle this for more cases.

      Yeah, but sometimes one run into corners where direct evaluation is necissary.
      Like get_element_value at some odd place where not possible to go through normal routine.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: WebDialog parameters passed to callback cause .to_l error

      @unknownuser said:

      Really? Does "1,0".to_l work?

      Yes.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: WebDialog parameters passed to callback cause .to_l error

      Yes John. Still on 8. I havent had time to test the new good stuff..

      Btw .to_s.gsub(".", ",").to_l worked for me in the node editor. But I can't remember if I did an eval on a hash_String before running that..
      I havent touched the JS for a while...

      Now seeing this I wonder if I got it all wrong, it seemed to work properly ๐Ÿ˜•

      edit: puts "1.0".to_l don't work(for me) on 2014 either. But it never has so I'm suprised you made it work. Maybe because your on Mac ?

      Oh yeah and even how ugly it may look this works: eval("+1.0").to_s.gsub(".", ",").to_l
      Then again I believe TS is not interested in hacks..

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: WebDialog parameters passed to callback cause .to_l error

      Ah yeah, Jim said that already.. I only looked at the code ๐Ÿ˜ณ

      puts "1.0".to_l still don't work for me.
      Error: #<ArgumentError: (eval):258:in `to_l': Cannot convert "1.0" to Length>

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: WebDialog parameters passed to callback cause .to_l error

      Yes, that is a side effect. If one would take that approach...

      It may be worth to mention "1.0".to_l doesent work either..

      I think it's debatable using forms at all..
      Passing onclick events to functions gives more options parsing the strings before sending them to Ruby..

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: WebDialog parameters passed to callback cause .to_l error

      How bout .to_f.to_l ?

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: Fast as an electric golf cart

      Holy crap! ๐Ÿ˜ฎ

      Sigh..

      How come every time I start watching something like this I end up
      looking at Shark attacks or Tiger Vs Lion fights on Youtube.
      It's inevitable..

      30 minutes of productivity lost ๐Ÿ˜„

      posted in Corner Bar
      jolranJ
      jolran
    • RE: Grasshopper to SketchUp?

      I dident know that! Good information, thanks.

      posted in Extensions & Applications Discussions
      jolranJ
      jolran
    • RE: Grasshopper to SketchUp?

      I have to dito Jeff.

      If I remember correctly there was a topic where Tig and Thomthom helped this guy making the .rb import geometry with the help of a timer. So that's how it works (?).

      Maybe there are some extra precautions for getting viable geometry in Sketchup,
      and positioning the geometry ?

      Also if it does becomes a "2 way street", this plugin could be very useful for Rhino-users,
      importing Sketchup geometry on the fly..

      I don't own Rhino so I can't test...

      FYI. I'm still working on a Sketchup integrated solution on a daily basis. ๐Ÿ˜„
      Nothing fancy as Grasshopper of course..
      (no timetable set)

      posted in Extensions & Applications Discussions
      jolranJ
      jolran
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 51
    • 52
    • 4 / 52