sketchucation logo sketchucation
    • Login
    1. Home
    2. pcmoor
    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!
    FredoBend | Powerful new bending tool for SketchUp Download
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 378
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Revit-like Adaptive Component

      True, but we can hack at the problem given that the ruby script example allows

      "Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted....provided that the above copyright notice appear in all"
      Hi
      I recommend that (if you haven't already) download Alex Schreyer: Ruby Code Editor
      http://sketchucation.com/pluginstore?pln=as_rubyeditor

      open it and checkout its features..

      now to find the path to the plugin folder...
      something like C:\Users\PHILIP\AppData\Roaming\SketchUp\SketchUp 2016\SketchUp\Plugins (it may pay to set a short cut to this)

      So assuming you have down loaded the su_examples
      So using the ruby editor...looking at the linetool example, it would seem pointless or impossible at this stage to completely understand all of whats going on, and I must admit I'm fairly new to this.
      the # bits (grey) are comments, there is a lot about the mouse control, but I skip that.. no point reinventing the wheel.. but hello this is actually two tools...the second,cylinders that inherit functions from the first line tool..we can build our tool(s) on this. Most of the work already done

      But first you probably notice how darn hard it is to run this script. We need to borrow a bit of code say from the box.rb and overwrite the linetool.rb to have easy access.

      Close linetool.rb and open boxtool.rb
      what makes it visible?..looking for key words...load...menu?

      the section below

      if( not file_loaded?("su_examples/box.rb") )

      # This will add a separator to the menu, but only once
      #Note: We don't translate the Menu names - the Ruby API assumes you are 
      #using English names for Menus.
      %(#0000BF)[add_separator_to_menu("Draw")]
      
      # To add an item to a menu, you identify the menu, and then
      # provide a title to display and a block to execute.  In this case,
      # the block just calls the create_box function
      %(#0000BF)[UI.menu("Draw").add_item($exStrings.GetString("Box")) { create_box }]
      

      end


      can be copied and pasted into linetool.rb and change box in the two statements plus the menu text line to something descriptive

      if( not file_loaded?("su_examples/linetool.rb") )
      add_separator_to_menu("Draw")
      UI.menu("Draw").add_item($exStrings.GetString("construct line")) { linetool }

      same for the cylinder

      add_separator_to_menu("Draw")
      UI.menu("Draw").add_item($exStrings.GetString("%(#FF0000)[pipe line]")) { %(#FF0000)[cylindertool] }
      

      end

      you can run it to check
      then if okay save to an appropriate folder

      Now you need to close Sketchup and overwrite the existing with this one (perhaps saving a copy if you need to return to a previous version)

      I found by overwriting, I am able to have the menu items appear when Sketchup opens
      So with menu items we can now create some keyboard shortcuts, (window/preferences/shortcuts) say shift L, for the constuct line, and shift P, for the pipe

      hopefully all works
      any comments or code corrections,ideas welcome

      so ends this part

      posted in Dynamic Components
      P
      pcmoor
    • RE: Revit-like Adaptive Component

      There is a problem with using the rotate and scale tool in that the DC is rotated as well.
      I believe the solution is to create or modify a ruby script. That is to go back to the line idea, and build a tool that draws a dynamic component line

      http://www.sketchup.com/intl/en/developer/

      from examples
      http://www.sketchup.com/intl/en/developer/docs/examples

      use the linetool.rb

      idea: check out how it works and modify to suit

      posted in Dynamic Components
      P
      pcmoor
    • RE: Revit-like Adaptive Component

      I have just discovered ThomThom "rotate and scale" (extension warehouse) which will move the objects to the desired position. Though you do require a redraw of the component after the move.

      posted in Dynamic Components
      P
      pcmoor
    • RE: Revit-like Adaptive Component

      Profile Builder could be the answer, it allows one to switch to a line path, edit this and the profile will follow the new path.

      posted in Dynamic Components
      P
      pcmoor
    • RE: Revit-like Adaptive Component

      By double wrap, I mean the contents of a component are made into another, so you end with a component containing a component. This method I believe, by passes the scale definition and the size based on the passed attribute values.

      From observation,
      -a component file when opened shows the child contents/attributes not the parent

      • a component can retain a scale factor, the steel beam examples of sketchup in the warehouse show this

      Link Preview Image
      3D Warehouse

      3D Warehouse is a website of searchable, pre-made 3D models that works seamlessly with SketchUp.

      favicon

      (3dwarehouse.sketchup.com)

      the series are built with a common 2.5" length, so after scaling a swap will update to the current scale.

      I found that the scaling failed on more complex DCs
      1m components.skp
      try component_1,and _2 swaps okay after scaling but _3 does not swap with _2 or _1 though the other way round works

      After a few different experiments I found the double wrap worked, this is advantageous as the second level can be multiple exploded or outer-shelled to leave the data component wrapper, ideal for report writing, painting...and after purge smaller file size

      in essence: simple to complex works, but without the wrap, complex to simple does not

      300x100 Beam.skp
      this is a simple beam with the geometry collected into a inner component. In this form the swaps seem to be successful both ways


      rods.skp

      posted in Dynamic Components
      P
      pcmoor
    • RE: Revit-like Adaptive Component

      the insertion point and direction of a component is determined by its axis position and direction, and probably the only thing it has in common with a Revit adaptive component. There is only one insertion point, however the Dynamic component can react to scaling and movement depending on the conditions applied in its attributes.

      you could create a rod centered at the insertion point, initially with direction in all planes, then use the scale tool to modify its length / direction

      I would suggest a different work flow
      importantly components can be swapped, but to bypass the set size, one must use a double wrapped component and expose some or all its size attributes.

      For example a line can be changed to a component with an axis placement, then later swapped with a complex component.The complex component must be wrapped and refer to a current value, in this case current("LenY") {*2.54 if metric }

      So draw some raw line geometry that represents a frame, select a line, type G, press "set component axis" on the dialog, place new axis at an end, rotate until get perpendicular, click and set the y axis along the length of the line. Make sure "Replace selection with component" is clicked and create. Now open attributes and click size(add all). Now this line component can be swapped with a component with scale-able LenY.

      Attached is a steel beam component which you can swap (once saved to a folder) with the line you created. This component is the one enclosed within another, double wrapped with attributes passed to the child.

      Further swaps can be made with components of a similar design (or family to use a Revit term) you can outershell or explode the inner parts of a complex component to form raw geometry, hence easier to edit, paint, takeoff...you can swap again with same or another. The steel beam can be simplified by this outershell and explode method


      UB-Steel.skp

      posted in Dynamic Components
      P
      pcmoor
    • RE: Scalable rebar cage dynamic component

      In reference to the edited example of ligature in the previous post,first save to a dedicated folder. Then one can after entering the size, select the wire & section sub components (best using outliner), explode 3 times then activate followme and pick the section to follow the wire path.
      Sounds a bit complicated but give it a go. The data still remains in the parent, and can be swapped with the saved component to reinstate if further editing is required

      posted in Dynamic Components
      P
      pcmoor
    • RE: Scalable rebar cage dynamic component

      Hi Oladipo,

      I would like to consider a different perspective and workflow. I have attached a wire representation of a stirrup or a ligature as we call them in Aussie. The concept is to use simple models which can be swapped later with complex one where detailing warrants it. this greatly reduces file sizes and hence better performance

      Cheers
      Philip

      edited example, corrected bends, added ability to convert to solid using followme


      Ligature Wire.skp

      posted in Dynamic Components
      P
      pcmoor
    • RE: 3D Truss Models

      option to draw ceiling joists? That would be great and a collar tie and ridge tie option. Better still give the option to place them at a given height.

      posted in Plugins
      P
      pcmoor
    • RE: Wall of concrete blocks dynamic component

      I would refer you to a similar post
      http://sketchucation.com/forums/viewtopic.php?f=289%26amp;t=63127

      please read

      I attached a version 8 copy


      version 8

      posted in Dynamic Components
      P
      pcmoor
    • RE: 3D Truss Models

      Hi Nathaniel,

      I made a few Dynamics of hips, valley creepers (see my warehouse page) may help in working out pitching points and angles, or help to formulate your ideas
      https://3dwarehouse.sketchup.com/user.html?id=0838679030929007270242769

      philip

      posted in Plugins
      P
      pcmoor
    • RE: Using Components - need a hand...

      you would need pro, so then you can make a dynamic component with fixed position, refer to stair post recent in dynamic components

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

      posted in SketchUp Discussions
      P
      pcmoor
    • RE: Trouble w/ dynamic stair

      use for lenz attribute

      LenZ =current("lenz")

      it will adjust first then become stable

      make X,y adjust to position, you have them set at a value, delete the =

      with Z, you could create a option to change its value or use =current("z")

      posted in SketchUp Discussions
      P
      pcmoor
    • RE: DC - Changing one and all instances update?

      Unlike common components which can be scaled, any changes to a copy makes that DC unique. Once the DC has become unique it no longer has a shared definition.

      posted in Dynamic Components
      P
      pcmoor
    • RE: Dynamic Components Copy Positions

      You can use condition statements to effect the placement, if you want individual input, perhaps up to ten, then you can use the dialog.

      x = 10 + if(copy,10,0) + if(copy>1,80,0) + if(copy>2,300,0)

      results for copy: for 0 => 10,for 1 => 20, for 2 => 100, for 3 => 400, your first example

      or
      x = if(copy=0,value1,0)+if(copy=1,value2,0)+if(copy=2,value3,0)+.......

      There is an example on my warehouse page
      https://3dwarehouse.sketchup.com/model.html?id=u39b49ce8-66fb-4a59-ab35-3e9c9ae3d1ea

      where either selected or user input effects position and number of copies of elements to build a door

      But after a point, based on complexity and file size, as Phillip says....use Sketchups native tools

      posted in Dynamic Components
      P
      pcmoor
    • RE: DC - Changing one and all instances update?

      to change all instances of a DC(even different DCs) you use the option dialog on the selection, this will make all their common properties the same.

      It is a good idea to group DCs after using the move,copy so that they don't become unique on a further move

      there is a need for a better attribute sorter, editor which will I hope be included in the next release otherwise there is a real need for a ruby script similar to excels find and replace

      posted in Dynamic Components
      P
      pcmoor
    • RE: Feature request.

      Hi Phillip

      could you use the nudge idea with a variable input, like int(255/input)? to get one to a general color change then fine tune to suit.

      Philip (with only one L)

      posted in Dynamic Components
      P
      pcmoor
    • RE: Dynamic Components Function Examples

      Hi

      I believe animating the sliders maybe more effective than the scaling idea. Each slider should have a front and back component/group switch, which moves the slider a given distance. Similar to your scale method a step can be updated or reduced. The corresponding step can be added/subtracted to influence the color as well as the slider position.

      Added a sample continuous movement on a cube using the set function

      Must say G'Night from a Tassie Friend


      switch_move_rotate.skp

      posted in Newbie Forum
      P
      pcmoor
    • RE: Dynamic Components Function Examples

      the other forum has noted the loss of examples

      Link Preview Image
      Basic self paced tutorials broken?

      I use SketchUp with students a few times a year and prefer the self-paced tutorials for them to get familiar with the basic concepts, but currently all the basic tutorials supplied by “SketchUp” appear to be broken. They…

      favicon

      SketchUp Community (forums.sketchup.com)

      Capture.PNG

      plus other issues with tutorials..maybe this is the lead up to the new release

      The DCs are but spreadsheet cell formulas, convenient for simple object manipulation. Ruby on the other hand is a language use to create plugins. (DCs forms and functionality was built using Ruby)

      However DCs are the most likely vehicle for information modeling, so understanding how they work is not a waste of time

      deleted last comment

      going through your examples now

      posted in Newbie Forum
      P
      pcmoor
    • RE: Dynamic Components Function Examples

      Had my dinner.. just checked the warehouse examples, they are indeed empty. This was not the case years before. Someone has stuffed up with updating the models.

      Can you share the models you are working on and formulas you are having difficulty with

      posted in Newbie Forum
      P
      pcmoor
    • 1
    • 2
    • 9
    • 10
    • 11
    • 12
    • 13
    • 18
    • 19
    • 11 / 19