sketchucation logo sketchucation
    • Login
    1. Home
    2. chrisglasier
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 103
    • Posts 1,031
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Cooperative Modeling

      @plot-paris said:

      if the changes were viewed live (or almost live), that would be huge fun! one person could simply navigate through the model and look around, while three others are building it.

      Something like what Onuma does at his BIMStorms perhaps?

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • RE: Standalone Analytical Animation

      See also:
      http://www.sketchucation.com/forums/scf/viewtopic.php?f=79&t=16060&p=125140#p125140

      for another example.

      Chris

      posted in Extensions & Applications Discussions
      chrisglasierC
      chrisglasier
    • RE: New help animating cutting paper

      @wwholcomb said:

      I'd like animate the sheet being cut for the trim, then being quartered, then into strips, and so on ...

      Here is a work in progress clip of an animation for packing a container with bathtubs.

      [flash=425,344:20lkjm70]http://www.youtube.com/watch/v/TL8q17qSKrk[/flash:20lkjm70]

      I can animate each bathtub separately if necessary.

      I intended to do something similar for cutting plywood and other similar standard sheets. I could bring that forward if you think that would be useful and are not in too much of a hurry. If so, upload or send me any pix you think may be useful.

      Chris

      Update:
      It is the first day of Chinese New Year with nothing much happening around here ... so I decided to make a start. Anyway, it is a good example to support my analytical animation fixation - see http://www.sketchucation.com/forums/scf/viewtopic.php?f=80&t=16011.

      Here is my proposed control interface, which is a Sketchup plugin with web dialog (made with html and javascript connected to Sketchup via a ruby script):
      sheetCuts3.jpg
      This is used to set the criteria and generate and position the pieces, starting with the first piece and then continuing with the cut pieces. Pieces not being worked on will be set to alternate sides. This should emulate the production cycle.

      The controller can also be used to show the effect of amendments or for manual animation using previous and next; or it can be fully automated with the controller hidden.

      Settings can be in metric or imperial, units or percentages. Turn is there not only on the assumption that the cutting axis is fixed but also to cope with irregular cross cuts. There could be options for 3D views but I am not sure they would be worthwhile. Reload is there just to make checking the code easier and will be removed.

      If you think it would be useful, I will be happy to send you the plugin files when they are complete without any obligation or responsibilty on either side.

      Anyway let me know what you think.

      Chris

      posted in Newbie Forum
      chrisglasierC
      chrisglasier
    • RE: Cooperative Modeling

      @l.frisken said:

      I Agree with that.
      It would also be great when people work in teams to do a building for instance, making life easier in terms of what goes where and what other people have made already.

      The development of namesets is intended precisely for that - visit NS website and let me know whether this matches what you have in mind.

      Cheers

      Chris

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • Standalone Analytical Animation

      Some of you may have seen my video trials, discussions and pleas for help about analytical animation. My original intention was to develop it only as a Nameset plugin. But over the last few months I see quite a few members are interested in animation other than that built into SU, which gave me the idea that a standalone javascript JS SU animator may be popular and useful as an SCF plugin. I should say that I first became aware of the possibility from Scott Lininger's video on web dialogs which led to his Prince IO game. Scott shows plugins work for gaming; I know they can also be made for a wider range and to satisfy the type of needs commented in the forums.

      Example comments

      livra_depp - "I try Sketchup, but my prof wants the cars and people moving with certain speeds to support accident's risk estimation" ... topic

      yaakovraskin - "Does annyone know of any animation programs which work with SU (free, preferably)? The easier (and cheaper) the better, obviously, but I havent found any so far" - topic

      chango70 - "Sketchup's native animation keep falling short." - topic

      JClements - [ARPlugin] "Another reason for SketchUp to develop some core animation tools." - topic

      Ross Macintosh - "It would definitely be cool if your approach to animation (as shown in your video examples) would work while the model was presented as an augmented reality." - topic

      McFlurry - "Didnt know SU can do such things. Way to go SU!" - topic

      Example animation trials

      Please go to Animation section of NS website

      Development considerations

      If JS SU animation is to be capable of providing accurate and useful analyses beyond pure fun and scores it must not only involve knowledge of Ruby, Javascript and Sketchup (particularly with respect to weight and visualisation) but also UI design to set and analyse the animation data, the theory behind time scheduling methods (e.g. Gannt, Pert ...) and sequencing and so forth for each of the various processes for which JS SU is to support. I am willing to pitch in ideas, code and UI design proposals as well as my experience in design and construction planning and management, but I believe it needs a team from the community to properly criticise, develop, expand and support it for it to be adopted by members. So the purpose of this posting is to see if there is any interest. To help decide here are some starter ideas and scripts.

      Starters

      This short clip shows JS SU animation at its most basic:
      [flash=425,344:37h1rdfk]http://www.youtube.com/watch/v/4RNnrK4Q2UU[/flash:37h1rdfk]
      extract to plugins
      but you can say if you can do one you can do many. It is more complicated than that of course but it brings out important points.

      Here the Sketchup entity is initiated, sized and positioned by js via a Ruby, so that Sketchup is acting principally as a viewer. The variables have been entered directly into the js, but outside the basic they should come from a store of plain text records.

      I haven't had much luck with exchanging data with such records if the .skp file already exists as a normal model, but I think it should be possible to run a ruby loop to extract name, array index, dimensions, x, y, z and rotation for each. The name is important for users to identify from the web dialog what is to be manipulated, and the array index for identification of same by the ruby and for compiling or amending the records. I believe a single observer could be set up simply to rerun the loop after any change.

      Another point is control of speed and smoothness. The setInterval function is regulated in milliseconds and the incremental movement in millimetres. So there is plenty of room for adjustment. I came across this tutorial about multiple object animation and Tween class which has interesting methods for acceleration and deceleration. I believe there is much more to discover to add to the potential of JS SU animation.

      Here is the ruby file I compiled for Namesets:Namesets3.rb I think it contains most things to allow js to communicate with Sketchup, with exceptions like, for example, raytest.

      Having said all that and, of course, if there is sufficient interest, then I guess some of the first things to agree would include a name, basic interface design, development stages and administrative protocols.

      Thanks

      Chris

      posted in Extensions & Applications Discussions extensions
      chrisglasierC
      chrisglasier
    • RE: Prince Harry Racism

      The POM always started those meetings with a cheery "Morning chaps." After three meetings one of the attendees approached and said "Please do not call us Japs, we are Japanese." The resultant embarrassment all round lead to a strong and respectful relationship thereafter.

      posted in Corner Bar
      chrisglasierC
      chrisglasier
    • RE: Animation help needed

      @mcflurry said:

      Didnt know SU can do such things.

      SU doesn't but it does give the opportunity via ruby API and webdialog. I feel a bit guilty about making this sound complicated, so I made a five minute dead basic example. Extract both files to plugins folder and give it a whirl (for about 5 seconds).

      Chris


      Machine.zip

      posted in SketchUp Discussions
      chrisglasierC
      chrisglasier
    • RE: Raytest

      @unknownuser said:

      Silly me... I thought you wanted to learn how to use raytest! You want to know how to do collision detection in 3D. If I knew, I'd tell. I presume raytest would be a piece of that somewhere.

      Todd

      I am sorry Todd if you think I misled you. Yes, I do want to learn how to use raytest and I believe what I am thinking about is simple clash detection in the XY plane. If you have time any snippets you feel may be appropriate would be well received.

      Thanks

      Chris

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • RE: Raytest

      @jim said:

      I'm not sure a raytest is the best (first) strategy here. It may be easier to use a simple distance calculated from the center of each object's BoundingBox.

      Thanks Jim. I agree - generally I use maths (Brit) when I know the positions of objects, for example, when transferring from trucks to stack or stack to hoist. But what happens if two such operations are worked at the same time - one team is stacking the objects whilst the other is picking the most recently stacked for the hoist (the remainder forming the buffer)? The hoisting cycle will be variable depending on floors served (particularly on high rise) and also the truck cycle is unlikely to match. In this case I think a raytest would be most appropriate.

      I don't know yet how to code for raytesting, but it seems to me there is likely to be many peripheral things to consider. For example, if two or three objects are charged with raytests that tell them to stop when another is detected, and they all detect each other how do they know when to restart?

      If you are interested in this kind of thing I would much appreciate your continuing advice.

      Cheers

      Chris

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • RE: Raytest

      [flash=425,344:24w1bqhm]http://www.youtube.com/v/cBDihpeXkFQ[/flash:24w1bqhm]

      Here is an experiment resulting from what I have cobbled together so far in respect of animation. As you see I can determine the direction, rotation (including offsetting) and speed for three components along three different paths. Of course I could have staggered the starts but left that until later as I was first curious whether the basics could be achieved. What I cannot determine is clashes, hence my cry for help.

      Here is what I have done in case it is relevant to raytesting (or whether raytesting is worth considering if the process is doomed to fail or run too slowly).

      The paths and so forth are made with this interface.

      NS animation UI.jpg

      [flash=425,344:24w1bqhm]http://www.youtube.com/v/TJ_jZAJn1bg[/flash:24w1bqhm]

      As I don't know how many components are to be animated at any one time, I have a function that writes a new function for each component's animation. There is a single setInterval function that calls each of the new functions at every pass (presumably a sillysecond apart).

      I guess the raytest should be added to this:

      
      @dlg.add_action_callback("mover") {|d, p|
      	
      a = p.split(",")
      	
      entityNo =  Integer(a[0])
      theX = Integer(a[1]).mm
      theY = Integer(a[2]).mm
      theZ = Integer(a[3]).mm
      			
      model = Sketchup.active_model
      entities = model.active_entities
      entity = entities[entityNo]
      		
      point = Geom;;Point3d.new theX, theY, theZ
      t = Geom;;Transformation.new point
      	
      entity.transform! t    }
      

      the variables being supplied from the webdialog's javascript. The raytest would need to determine a possible clash and stop its component. It seems to me a lot of things arise from that, but first I think it best to find out whether you think I'm bonkers.

      Of course I am not only thinking about moving sanitaryware around but any process that can be elaborated by Namesets, visualised with Sketchup and analysed by both.

      Thanks for your offer of help (I hope it still stands!)

      Chris

      Added second video clip 11.00 GMT

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • RE: [Request]: RotateByCenterpoint.rb
      
      rv = Geom;;Vector3d.new(0,0,1) if theAxis == "z"
      rv = Geom;;Vector3d.new(0,1,0) if theAxis == "y"
      rv = Geom;;Vector3d.new(1,0,0) if theAxis == "x"
      
      tr = Geom;;Transformation.rotation(Geom;;Point3d.new(instance.bounds.center), rv, theDegrees)
      	
      instance.transform! tr 
      

      Here's what Jim gave me to do that, but it is part of a callback. Perhaps someone else can make it into a standalone ruby.

      Chris

      posted in Plugins
      chrisglasierC
      chrisglasier
    • Raytest

      Does any kind person have any sample coding for raytest? I want to use it to detect and avoid clashes of two or more moving objects on distribution paths. Thanks.

      Chris

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • RE: Dynamic Water Closet Stall & Basin Components Available

      @phillip said:

      Hopefully a few others will get some use from these components.

      [flash=425,344:19cspk31]http://www.youtube.com/v/cBDihpeXkFQ[/flash:19cspk31]

      I want to use them in something like this, but I am a bit foggy about DC components - are they animated in any way?

      Thanks

      Chris

      posted in Dynamic Components
      chrisglasierC
      chrisglasier
    • RE: Animation help needed

      Have a look at this from Google's Scott Lininger:

      [flash=648,480:bv38o60b]http://www.youtube.com/v/FALvwBN5-hc[/flash:bv38o60b]

      especially from around minute 15, where the character is manipulated from the webdialog, i.e the object is being moved rather than the camera moving from scene to scene. This seemed a more natural and useful way to help use animation to analyse processes ... and that is why I am developing that idea as support for day to day work.

      Chris

      PS morisdov is a forum member - I'm sure he will be happy to help you with his proper animation
      PSS I can give you the ruby code for doing the manipulation if your javascript is reasonably proficient to call it

      posted in SketchUp Discussions
      chrisglasierC
      chrisglasier
    • RE: Double rotations

      Fixed [flash=425,344:3qp1491i]http://www.youtube.com/v/TL8q17qSKrk[/flash:3qp1491i]

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • RE: Animation help needed

      The second one I am sure you can do using scenes and/or proper animation (http://morisdov.googlepages.com) but the first is more like I want to make - actually controlling the movement and speed of entities.

      Bon chance!

      Chris

      posted in SketchUp Discussions
      chrisglasierC
      chrisglasier
    • RE: Animation help needed

      Basically it is being made with html and javascript in a Sketchup webdialog, a set of ruby callbacks, SU components and groups, a lot of help from Jim and some other guys around here and a lot of cursing. The main point is that each part of the animation is made with digital devices that also report and function as editors (things can be changed directly or remotely via the web). Each SU entity is controlled separately within a single time line function.

      Lots to do yet but it is good to get questions like yours.

      Thanks,

      Chris

      posted in SketchUp Discussions
      chrisglasierC
      chrisglasier
    • RE: Grouping a selection of component instances

      Yes the explode works as well.

      Thanks

      Chris

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • RE: Grouping a selection of component instances

      Works like a dream - many thanks! To explode I just need to identify the group like this?

      entities[entityNo].explode
      

      Chris

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • Grouping a selection of component instances

      I want to group these component instances and the container, move it and then explode the group.NS baths.jpg I have ruby code for selecting and moving, but I cannot figure out the code for making the group and exploding it. I would really appreciate help.

      Thanks

      Chris

      posted in Developers' Forum
      chrisglasierC
      chrisglasier
    • 1 / 1