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

    Posts

    Recent Best Controversial
    • Exit plugin from within a function

      Hi

      I was trying to make things elegant, but it seems that I am trying too hard.
      In my plugin definiiton I try to use only functions calls, and to write all definitions in a library.

      def initialize() sel=Sketchup.active_model.selection SPP::test_start SPP::check_selection(sel) SPP::test_end end

      So first function returns messagebox , and the second one checks if anything is selected.
      If not I want to have a error message ( got it ) and then quit the whole tool.
      But somehow the third function also executes returning a message

      ` def SPP::test_start() # display initialisation message
      UI.messagebox "initialised"
      end

      def SPP::test_end() # display finishing message
      UI.messagebox "finished"
      end

      def SPP::check_selection(selection)
      if selection.length >0
      else
      UI.messagebox "Nothing selected ! Aborting"
      exit # HOW TO EXIT PLUGIN ?
      end
      end`

      How to solve it ? Is it possible ?
      Or do I have to check it within a main definition of a plugin ?

      Cheers Matt

      posted in Developers' Forum
      M
      MattC
    • RE: Suggestions for higher quality and more realistic render

      @decumano said:

      maybe I misunderstood some of your words on the pictures, be patient.

      Well english is also not mine native language, and handwriting didn't help, but it was the fastest way to express my thoughts.

      @decumano said:

      -geometry- I will try to correct with photoshop beacause in SU the chair seems round-curved

      It is not exactly what I ment - chair can be round, but at the back of the chair you have one sharp edge, and also where the seat meets wyth the backrest, You can see the shape of t he chair and there it is like cut with the nife.

      @decumano said:

      -make it more round(about the cirle on theroof)-you're right, but in SU it's a circle extruded, i don't know how to get it better. I will try

      I am afraid that the best option is to re-do it .You can try smothing it.

      @decumano said:

      -textures_ are flat, it's true (and should try to use bump and displacement, i'm going to study) but all those are panels and they should be flat, or not? Tiling..yes, ok i'm changing it. The lowe part of the wall are corten-iron panels, they must repeat, but it's true, they sounds bad.

      They can be flat , but usually you will se a crese where they join. The same goes for the floor tiles, usualy the part between them is a bit lower, and sometimes ther is a big difference in refelctions, (tiles reflects preety good , the concrete between not) Corten-Iron, it seems that every panel looks the smae, maybe try to rotate one panel 90 degrees clockwise, it will break repetition.

      @decumano said:

      -lighting.. yes, no shadows,why? Maybe because there are too much lights?

      here I cannot help, but maybe You can post a screen from Your sketchup file ?to see how the ligths are placed?

      @decumano said:

      -No, it's not ambient occlusion, is TEXTDIRT. I tried to use it to give more power to corners, but matbe is better to remove it.

      I haven't tried textdirt, only used AO , but You dont want to overdrive the settings as it will looks unnatural.

      Good luck
      Matt

      posted in V-Ray
      M
      MattC
    • RE: Triangulation and Convex Polygons

      Thomthom's idea should work great in case there is only one hole in a face, and if You make more vertices on the outside loop. The problem with 'spiky' triangles is that You have only 4 vertices to which the edges are drawn.

      Assume that You have two sets of points:
      [inner_vertices]
      [outer_vertices] - for example 25 points per rectangle side

      For every point from [inner_vertices] find closest point from [outer_vertices] and draw an edge between those two.

      (Possible problem) when two outer points have the same distance to inner point. Which point to choose ?

      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: Suggestions for higher quality and more realistic render

      Hi,
      First of all good job! You have asked for CC so few things that I noticed:

      • Geometry - some things should be more round, and in general most of your edges are sharp, in nature it is very uncommon
      • textures - Your textures are flat, ude bump maps where necesarry, and sometimes reflection, it don't have to be 100% reflexive and very sharp. Also notice how tiling and seams are apparent in Your render ( esspecially wood and sandstone (?) near mirror. The rusty tiles (?) on the lower part of wall are repeating - try to make them uniqe.
      • Lighting - well it is a mater of taste, but it also looks quite flat, You have almost no shadows.
      • Render settings - I don't know if it is ambient occlussion that makes a strange pattern near the edges , or something else.

      See attached pictures and keep them coming!

      https://lh6.googleusercontent.com/-1-oAgwouDNU/UTsC6DN-m3I/AAAAAAAABaw/xEOXDgHGkDI/s1200/5.png

      https://lh6.googleusercontent.com/-zXC6-RsROwM/UTsC6Lj2JnI/AAAAAAAABa0/6kh6Egn1k6M/s1200/2.png

      Matt

      posted in V-Ray
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      So it is officially begonnen:
      spin-heads.blogspot.com

      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Hi Pilou, Hello everybody

      Currently I am rewriting the whole Voronoi 2D plug-in.
      It is going painfully slow, but I have a lot of other things on my head right now.
      Why I am completely redesigning it? Well my understanding of Ruby got a bit better, and also I got some new ideas how to tackle this problem.
      What I want to accomplish:

      1. prepare a nice flow chart for a process of creating 2D Voronoi diagram
      2. based on that define set of standard functions that will be used
      3. compose final version of Voronoi 2D plug-in
      • do steps 1-3 with 3D Voronoi
      • do steps 1-3 with Conic Curve
      • do steps 1-3 with random point generator (2D and 3D)

      Shall I succeed then next step would be a "fracture tool" similar to one in Blender.

      @ Pilou
      So to create voronoi diagram You have to iterate through the message boxes i=1, i=2 ... etc?
      I think that that was one of the first complains and I have disabled it in one of later versions. If not I can do it one more time. the same applies to UNDO in one step. Conic curve on all faces in selection was also made, but I don't know if it was made an official release.

      Your last question is more complicated. Conic curve plug-in was made as a response to the topic in the first post. There You can see that there are multiple curves inside polygons. And all the polygons are convex. So the conic curve , which is a construction based on 3 points (let's say A B and C), is always located inside the smaller angle near the point B. In Your case polygon is Concave and conic curve will go outside. Is it possible to force it inside? Well it is.
      See explanation of how the conic curve is made in first post. You have to set an offset that will sit well inside, and also play with a weight value. But in this version You cannot set different weights for every vertex. Maybe I will get to that in one of the future releases.

      Stay tuned for more details. I will try to make a nice blog (possibly later an e-book) about it.

      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: Unfolding plugin idea

      @gade said:

      Hello, i'm very interested into your plugin but it's not working on my computer... is it possible to use your plugin with mac ? i have sketchup 8? please help me to use your plugin i would like to make a model ...

      Hi I will need some more informations to answer, I havn't used it in a long time, at least this version, but I see no reason why it should not work on Mac.

      You can also take a look here:
      http://www.papermodelers.com/forum/software/18100-spp-sketchup-paper-planes-tools-sketchup.html

      Greets
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      @ mitcorb - example : If You have polygon with 4 vertices, You can create 4 sets of points ([0,1,2],[1,2,3],[2,3,0],[3,0,1]).
      You can use those sets of points to create rational bezier spline(http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Rational_B.C3.A9zier_curves) by asigning weight to every point.
      Special case is when You set for first and third point weight = 1 , and weight "w" for second point.

      • when w>1 then created curve is a hyperbole
      • when w=1 then created curve is a parabole
      • when w<1 then created curve is an ellipse (in special case circle)
        Hyperbole, parabole ellipse and circle are known as a conic curves or conic sections , because You can create them by cutting cone with a plane.
        For further read : http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/NURBS/RB-conics.html
        http://en.wikipedia.org/wiki/Conic_section

      If You draw square, and apply coniccurve with weight w = sqrt(2)/2 = 0,7071, You will get a circle.

      @ Pilou - This is an implementation of 3DVoronoi - this is my next step, but at this moment I struggle a bit with a code...

      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Hi
      Yes I got it, Thanks a lot, I am a bit busy at my normal work, but plugin is still alive.
      I will try to get updated version online this weekend, but I was already focused on Voronoi2D version 2.0
      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Well... I think 2D voronoi package (delauney triangulation by TIG + Voronoi on XY plane + Conic Curve + Convex hull on XY plane) is almost ready.
      Next step will be: (delauney triangulation in 3D + Voronoi 3D + Conic Curve + Convex hull 3D).
      But it is a lot more complicated.
      So it is a bit to early to decide free / paid - but I think donationware ( if You like it - gratify creator) is the way to go.
      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      @juanjo said:

      But I have a little problem: you say that for this to run properly this plugin requires "delauney3.rb"
      I don't have it... I only have "delaunay2.rb".
      Also tried to use "qhull.rb" but it's a mess! I just get flashing DOS-screen ans crashes.... It's a shame, since it would also be a super-tool...
      Have you heard of any progress on that???

      Hi juanjo, if You download a zip package made by pjt, and not separate files from first post, then You will have "delauney3.rb" as a part of it.
      I couldn't get "qhull.rb" to work, and that was one of the reasons why I started to work on this project.
      But I have some problems with the code. Some cases generates strange forms. So the work continues.
      Greets

      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Yup, second way is exactly how I changed it.
      My fault was testing it on set of random points, and combination of 3 colinear points didn't occure.
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      True TIG
      I already implemented this trap, but also encountered another case that is a bit problematic.
      It is geometry limitation of Sketchup.

      I will update script when this will be solved, in a meantime if anyone also has non-working combination of points, post it here.
      I will have more material to analyse.

      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Hi,
      I will do it as soon as I correct bug that nectares reported.
      Also I already adressed some things from a wishlist.
      So stay tune.
      Also , evereyone that is using pjt's wrapped wersion with toolbar, please report if You can see icons, I don't know if it is only me that have this problem ??
      I don't want to fix things that are ok.

      In general Stat tuned. Version 1.1 is coming.
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      @unknownuser said:

      Few comments :
      1/ Could it be possible to undo the voronoi generation in one go ?(ctrl Z is going back through all the steps of the generation)

      • added to the wish list - see some posts above

      @unknownuser said:

      2/ It does not generate the voronoi all the time. Sometimes nothing happens. Any idea ?

      • if You can post Your .skp file then I can take a look at it.

      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      I've unpacked it just as at was, so icons sits in a folder Plugins/voronoi_conic.
      Somehow code

      cmd.small_icon = "voronoi_conic/icon0s.png"
      

      , does not work for me (Win 7 and WinXP)
      Strangely:

      1. :
      cmd.small_icon = "icon0s.png"
      

      and 2)

      cmd.small_icon = "./icon0s.png"
      

      both works.
      code 1) I understand as icons and ruby that invokes toolbar are in the sam location.
      But 2) searches for icons in Plugin folder...or am I mistaken?
      Does it work for You straight away ThomThom??

      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      the.pjt thanks for a hard work.
      I
      I must admit that that part of writing rubies is still unknown to me. I just concentrate on making my code running and not on wrapping it in a nice package as You did.
      One question - as I downloaded Your files I could not access icons, Toolbar was blank.
      so in place of

      cmd.small_icon = "voronoi_conic/icon0s.png"
      

      I used

      cmd.small_icon = "./icon0s.png"
      

      and it worked.
      I have no idea why it was like that.
      As for a wishlist:

      • add a point cloud generator ruby tool - this should be no problem, if we are talking about random pints in a cube/box, and probably random points on face but I have no idea (for now) about random points in a volume (is it possible in Sketchup ?).
        -add option to decide the resoult of VoronoiXY tool should be grouped or not - ok , just one userform asking if groups should be exploded in the end.
      • add option (ConicCurveInFace.rb) that let user make ConicCurves from grouped face (resoult of VoronoiXY tool)- this should also not be a problem
      • add option (ConicCurveInFace.rb) that let user make ConicCurves from a set of selections .. no need to click and click and click ... - same as above.

      I will try to get it done, when I finish 3DVoronoi.

      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Hi Can You attach sketchup file that is causing problems, or is it in general ?
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Pilou You 're teasing me πŸ˜„
      Is it Sketchup ??
      Or something else?
      Well only step that I miss from those, is generation of 3D Voronoi πŸ˜„
      For rest I have plugins already.

      @ Joel, indeed there WAS a problem - file in first message is updated.
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Could You show me an example of box shaped plan and what You would like to obtain ?

      posted in Plugins
      M
      MattC
    • 1
    • 2
    • 3
    • 1 / 3