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: Transform face to a known plane

      Ok missed the the key part in the first post....

      It might be difficult to find a general solution if you want the correct X or Y rotation flat at the ground from a reversed face transformation ? Don't know if anyone found a simple solution to that unless digging in at entity level and comparing angles.
      For a simple rectangle face it might be solvable, but a complex polygon how do you tell which edge or vertice to use for alignment ? It's easier to do with parametric Surface and derivatives πŸ˜‰

      An alternative might be to use Vector3d.axes, where you form your own axes with the face.normal as Z-axis and use those with your Formulas. Might remove the need to move the face to Origin. Same problem with alignment though but when creating a tempgroup for a faceclone ( you can't move the original πŸ˜„ )its Z-axis is not pointing in the face normal direction, so there is quite some work to make the boundingbox aligned so the face is flat on the ground when reversing transformations..

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: Transform face to a known plane

      The "specific plane" ? I assume you mean the modeling plane where the face is located to start with ?

      It says in the API

      Geom::Transformation.new(origin, zaxis)

      Don't remember if it was this one I used..
      Try: origin, a Point on the plane and zaxis should then be the plane normal.

      Edit: Be aware though that it's not really a reliable method since only providing 1 vector and not a frame. Sketchup does some thinking and comparing to decide what is supposed to become X and Y axis. So if rotation is important you have to do some extra work..

      Oh and you have to reset translation to ORIGIN before moving it to the face. I guess you could use a vector instead. Anyhew...
      If you have a plane and not a face. The plane is an Array[3] with Point and normal.

      
      ents = Sketchup.active_model.entities
      face = Sketchup.active_model.selection.grep(Sketchup;;Face)[0]
      gp = Sketchup.active_model.selection.grep(Sketchup;;Group)[0]
      	
      normal = face.normal
      c = face.bounds.center
      tr1 = Geom;;Transformation.new(c,normal)
      #reset to ORIGIN
      gpc = gp.bounds.center
      tr = Geom;;Transformation.new([-gpc[0],-gpc[1],-gpc[2]], Z_AXIS)
      
      gp.transform!(tr1*tr)
      
      posted in Developers' Forum
      jolranJ
      jolran
    • RE: [New scripter] Will need help on my project (now and then)

      Sketchup uses an internal precision of 0.001 or so. So any time you create a Point3d object values gets rounded to that.

      So Ive seen some workarounds:

      An idea is to use arrays instead of Point3d objects and do the bulk calculation in Ruby or C/C++.

      Should you need Point3d objects for display, create them lastly before adding entities to the model. You can still get the x values from Point3D by pt[0] for ex. So no need to rewrite arguments.

      Obviously you can't use Sketchup API methods that need Point3d objects during the calculations then, but it sounds like you are using your own intersection algorithm(?).

      If not then an alternative is to scale up the whole piece you are working with. And when done scale down to original size.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: SketchUp 2016 is here....

      Looks like some major core changes that may not be evident for many users. Layout API could potentially bring new cool plugins.

      posted in SketchUp Discussions
      jolranJ
      jolran
    • RE: Error Drawing Lines

      Same results while using entities.add_curve ?

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: SketchUp 2016 Wishlist

      @jiminy-billy-bob said:

      Whow, where did you dig out that quote? πŸ˜„
      Great to hear your project is still alive!

      A friend directed me to your post in this topic πŸ˜„

      And yeah, havent given up yet. I hear you are on the way to success soon πŸ˜„

      posted in SketchUp Feature Requests
      jolranJ
      jolran
    • RE: SketchUp 2016 Wishlist

      @jiminy-billy-bob said:

      /summon Jolran

      The project of "Node-modeler" is far from dead. Although I have taken the direction of a NURBS based approach for curves and surfaces. Which have delayed any potential release considerably.

      Polygon/vertice based parametric calculations proved rather slow and unpractical in many cases. Even in C++

      posted in SketchUp Feature Requests
      jolranJ
      jolran
    • RE: Blade Runner 9732

      Cool post Pilou! πŸ‘

      I love Blade Runner movie and especially the soundtrack.

      They really captured the details in the modeling. Fun Project!

      posted in Corner Bar
      jolranJ
      jolran
    • RE: Waffle Slabs... any plugin to help doing those?

      Sdmitch's plugin look really promising.

      Just want to remind you that you can create 3d-geometry from 2dBoolean plugin, pushpulling or translating faces selected by materialnames. So you could create several basegrids and position them as you like and do a 2dboolean (extrusion mode).

      Not fully automatic, but can be useful when else fails. Or at least another method to try.

      All the best!

      posted in Plugins
      jolranJ
      jolran
    • RE: Odd results from add_circle/add_face combo

      Doesent work for me either when running in SU8 and Alex Ruby code editor. BUT it does work from the Ruby consol pasted as a oneliner(semicolons).

      So... maybe some hickup in the webdialog...

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: SKUI β€” A GUI Framework for SketchUp

      @unknownuser said:

      Do you know if exporting a project also includes your own uploades SVG icons?

      ( btw don't know if it's off topic since the discussion is regarding glyphs πŸ˜• )

      Yes that's the whole reason I use it. In spite of the pros and cons of Icon-fonts I found this to be best solution for me since having many Icons that need to be updated irregulary.
      Updating PNG-sprites is a pain in the a$ in the longrun..

      Project is contained in a JSON file that you upload that will contain Icon-information with current unicodes and woff's, oet's etc. Then from there you save a new file.
      These files have to be reloaded in your Project after an update off course.

      I can't remember if there where any updates that had to be made in the CSS afterwards. Not many anyway..


      It's been a while since I delt with this, but I can give you an idea of the workflow, if you want to try it out. And in that case can find further information at the Icomoon site.

      Anyway here goes:

      Well first off you have to create the art in Illustrator (or incscape whatever)
      And save as SVG.

      I further compress the SVG with:

      Link Preview Image
      GitHub - svg/svgo-gui: Node-WebKit based GUI for SVGO

      Node-WebKit based GUI for SVGO. Contribute to svg/svgo-gui development by creating an account on GitHub.

      favicon

      GitHub (github.com)

      Gives reductions between 20-60 %

      Then upload the Icon to the Project and make adjustements in the Icomoon ap. (move, scale)

      It takes some experimentation because Icons can get blurry if borders fall in an inbetween pixel value.
      So in Illustrator i set up a grid with the actual target destination size (for ex 24px) and try to keep artwork snapped to those pixels, even if we are dealing with vector-art!

      When Everything is setup. I can use the Icon as classes or as a inline data-Icon.
      The data-Icon setup is not te be found on the Icomonsite if I remember correctly.
      But if youre interested in it you can PM me. πŸ˜„

      The fontstyle can also be used inside textareas with normal text and icons.

      The backside of this of course is that the icons are unicolored. There are some tricks to use multicolored font Icons, but I wouldent use them, because the contain to much information and can get blurry when resized because they use a hatching trick..

      If you are just going to use a few Icons, then it hard to beat plain png-sprites and classes.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: SKUI β€” A GUI Framework for SketchUp

      @unknownuser said:

      And I can't think of a way to position it halfway a line of text...

      OK, now I'm getting uncertain if icomoon is a valid alternative for you...
      (From gathering your Picture. And how far you have come already in your setups )

      With Icomoon (or any font-Icon setup ) you could however include Icons anywhere in text, using it as a font.

      By the looks of it you want an inline button, though. And that would require nested elements I presume(?) So universal solution might be tricky for that..

      Here's an example of Icons in text(in a text-area), if it is of any help.
      You just build a string and include the unicode value ( \ue606 for ex ) where you want that Icon. It's quite easy. But I feel now it's not as powerful as you wished for..
      Styling is also very limited this way...


      nodeselectionPIC.jpg

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: SKUI β€” A GUI Framework for SketchUp

      Have you had a look at icomoon ?

      https://icomoon.io/

      Makes it easy updating sets which can be a pain if using png-sprites for ex.
      ( You can create your own sets in Illustrator. )

      Could be a viable solution.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: C++ using swig

      Like Thomthom said.

      If you look at this topic (same as link above) there is a lot of information for setting up things.

      TT guides me through the ordeal in a usual friendly way. πŸ˜„

      http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=58825

      Also (to my liking) switching to a newer Visual Studio gave better compability with C++ 11
      making it easier to work with vectors for ex. I highly recommend doing that.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: Distance between two points / optimization

      @unknownuser said:

      I'm working on a new way to create grass within Tree Maker (put a lot of plants on surfaces) that I would like to look more realistic with more or less dense zones. Now it works, but looking to improve and optimze it.

      I started to suspect you where doing something like that. No real precise need for ordered Points
      then.

      As a continuation of Thomthoms advice. Should you ever want to create a C-extension easily for distance between Points the code is already written and available πŸ˜„

      https://bitbucket.org/thomthom/sketchup-ruby-c-extension/src/e2fe0f2e43e43ebae568535b6d7a98e160b4624c/src/Example%20-%20Basics/SXBasics.c?at=default

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: SKUI β€” A GUI Framework for SketchUp

      @unknownuser said:

      Thanks for pointing this out. Might be better to let this rest until I really need it πŸ˜‰
      One positive thing might be that the progressbar would be for while I wait for a server to process my model so I don't think ruby has to work hard in the background.

      Ah, you might be ok then if it's not coming from Ruby.

      And (se above Drivens post) I remember now. Indeed Driven has showed me some cure for a progressbar. So it's doable.

      Although a progressbar might not be the most important aspect of your plugin πŸ˜‰ πŸ˜„

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: SKUI β€” A GUI Framework for SketchUp

      @brewsky

      Don't want to be a bringer of bad news 😳 , but I have some negative experiences with that.

      It can be problematic to do a progressbar to webdialog. Due to the "freeze" that happends when ruby calculates.

      There where some early reports on that long ago. (Look in the first link at first post.)
      Don't know if that is still a problem with 2015.

      http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=54873%26amp;hilit=+webdialog+freeze

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: Distance between two points / optimization

      @unknownuser said:

      Well, no, it's a very primitive (just a plain 3D-array) standard space hash. It's surprisingly effective on average; memory intense though. I use variations of this quite often, here's another example.

      Nice. Useful to know. Also good it doesent come from a library that has draconian licence policy πŸ˜‰
      I might try it out a bit πŸ˜„

      @unknownuser said:

      That's very strange, I've tested on two computers and my results are more like ~0.2s (vs 4.7s for Pascal's code). I wonder where the huge time penalty comes from in your tests, maybe it's the memory allocation in init()..?

      If I remember correctly(?), I think he is on a laptop. So memory consumtion might slow things down in his case.
      edit: missread the topic..

      Since I did not see the aim of this algorithm. I think it's a relevant question to pose
      what are you going to do with these Points ?

      It looks to me like the result in both methods are in an unorderly fashion.

      Unless this algorithm takes care of the sorting you would have to dig through the set again.

      edit2
      Ah β˜€ , Pascal's maker of the Tree plugin. Now I can see the usage of pointcloud.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: Is there a Taper plugin

      You are welcome πŸ˜„

      posted in Plugins
      jolranJ
      jolran
    • RE: Is there a Taper plugin

      Fredoscale ?
      http://sketchucation.com/pluginstore?listtype=1%26amp;author=0%26amp;category=0%26amp;search=fredoscale%26amp;submit=%3F

      OT: What's this annoying inset screen with headset "outfit" everyone is using these days.. Bah, kid's these days..

      posted in Plugins
      jolranJ
      jolran
    • 1
    • 2
    • 3
    • 4
    • 5
    • 51
    • 52
    • 2 / 52