sketchucation logo sketchucation
    • Login
    1. Home
    2. BillW
    3. Posts
    ⚠️ Attention | Having issues with Sketchucation Tools 5? Report Here
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 10
    • Posts 33
    • Groups 1

    Posts

    Recent Best Controversial
    • SU Gui toolkits

      Has anyone found any toolkits for GUI creation in Sketchup apart from webdialogs.
      I have revisited an old set of plugins where I used wxsu at http://wxsu.sourceforge.net/ which allowed me to create some very sophisticated dialogs including auto resizing. Alas xwsu has not worked for a long time with Sketchup and unfortunately I hate implementing webdialogs. In fact Webdialogs was the main reason I stopped developing in Sketchup.

      In a perfect world I would be more than happy if Trimble implemented something similar to wxsu.

      posted in Developers' Forum
      B
      BillW
    • RE: Problem importing 3ds max models into SU

      Had problems with Max in the past when ungrouping/exploding groups would show the same symptoms you are seeing.
      I suspect the Evermotion furniture models have a top level group. Try ungrouping/exploding a model and see what happens.

      I think its something to do with internal transforms. Try Utilities "Reset XForm" on a selected model.

      If not, the only other way out I know is to transfer the Evermotion geometry to new geometry.
      ie create new geometry (say a box), in the Modify Panel - "Convert to Mesh" and "Attach" Evermotion geometry and delete box geometry.

      As far as polylines - I assume you mean splines - did a quick check and only closed splines were translated in 3DS Export but unfortunately you get a face within the closed spline.

      posted in SketchUp Discussions
      B
      BillW
    • RE: WxWindows for SketchUp Dialogs

      I would just like to thank Peter for his work with WxSU. Personally, I would much rather use WxSU than Webdialogs, much more flexible and entirely in Ruby and cross platform. With auto sizing, any dialog will even change to match screen resolution. You can also set a minimum dialog size for resizing.

      To give some idea of the rich capabilities, find enclosed a flash video of a set of dialogs (WIP) I have been working on and a jpeg showing the main dialog.


      Sketchup WxSu.swf


      Build entity.JPG

      posted in Developers' Forum
      B
      BillW
    • RE: Alternative to angle_between?

      Thom

      Following on from Chris, I dont know if this code snippet from one of my tools helps

      
      def checkside(v1,v2)
        v3 = v1.cross(v2)
        return ((v3.z < 0) ? 1 ; -1)
      end
      
      # main body
      v1 = @pts[1].vector_to(@pts[2])
      @alignment = checkside(@stairdirvec,v1)
      
      
      

      It returns 1 or -1 depending on which side I need to draw. @stairdirvec is the primary direction which v1 is tested against.

      BillW

      posted in Developers' Forum
      B
      BillW
    • RE: [prototype] Doublecut (0.1.0a) - Need help debugging

      Thom

      I have had a component hole cutting tool for a while - it doesnt use observers as the original code is ancient.
      Perhaps you might want to reuse.

      A component placed on a face must have a set of linked edges which define the shape of the cutout which reside on the cutting plane of the component. This means that the geometry of say a window doesn't have to span the component cutting plane inorder to perform cut. Try it in the example file. Select all components and run "Component punch". Notice the circular window which shows the edges of the window outline seperate from the geometry.

      If there is no back face (in the same mesh) parallel to the front face containing the component then the front face is cut only which allows the user to reuse for say running an intersection.

      Punch hole in place of component

      Example file

      Regards

      BillW

      posted in Developers' Forum
      B
      BillW
    • RE: Get instance parent of selected entity

      Thanks both again

      I tried a different tack originally with an add_group/explode combo but TIG the instances option worked perfectly.

      Chris as I am disallowing component edit sessions for the time being and I am coding for SU 6 upwards, I will bear in mind Model.edit_transform for the future.

      BillW

      posted in Developers' Forum
      B
      BillW
    • Get instance parent of selected entity

      If a user has entered a group and selected say an edge - I want to get the parent of the selected edge ie the group

      Typing in the ruby console
      Sketchup.active_model.selection[0].parent

      responds with #Sketchup::ComponentDefinition:0xd3390f0 which is not the instance of the group

      What I need to get is the transformation of the containing group.

      Is there a way to get a handle to the group instance from the selection?

      Thanks

      BillW

      posted in Developers' Forum
      B
      BillW
    • RE: Current material in material browser

      Hi Chris
      I did notice Adam Billyard's comments. I am working on the assumption that the wxSU rough edges will be ironed out and am skirting around any current problem areas. Also, I probably wont be using Lightup anyway. As I understand it there is a more recent version of wx which can be downloaded and used to overwrite parts of the wxSU installation, but I will leave that till wxSU is updated.

      Thanks

      Bill

      posted in Developers' Forum
      B
      BillW
    • RE: Current material in material browser

      Excellent! Thanks very much Jim and Tig.

      This will come in handy. I am converting some of my Studio Max tools and am using wxSU to create some very sophisticated autosizing dialogs all working in ruby (no javascript/web pages). I am a fan of wxSU even though there are some rough edges.

      Regards

      Bill Wood

      posted in Developers' Forum
      B
      BillW
    • Current material in material browser

      I have searched through the docs to find a call that returns a reference to the currently selected material in the material browser - to no avail. I was hoping for a call active_material

      Does anyone have any ideas?

      Thanks

      Bill Wood

      posted in Developers' Forum
      B
      BillW
    • RE: Frustrated with rubies

      Just a note for developers.

      I have started looking at wxSU for developing dialogs which ties into the native operating system dialog generation routines. I find Web dialogs a pain having to implement a mixture of ruby and javascript as well as the web page. wxSU is written in ruby so less levels of translation. Dialogs can be flexible with auto resizing of the content. Takes a bit of getting used to though.

      Relating to the topic, there is a progress bar dialog in the examples folder "ProgressDialog.RB"

      wxSU can be found at http://sourceforge.net/projects/wxsu/

      posted in Developers' Forum
      B
      BillW
    • RE: URGENT help needed - importing polylines

      I did a quick test from VW 12.5 PC with a filled polygon, polyline and rectangle exported as DWG 2004/2005/2006 with "Top Plan" view with all "2D fills and Files" check boxes checked and VW file units set to "Feet/Inches", imported into Sketchup 6 - units inches and all came in OK.

      As you are working on a city map, I suspect the world origin may be a long way from the centroid of your graphics which may be causing a problem. Also make sure the units match between the export from VW and import to SU (which you probabaly have checked)

      posted in SketchUp Discussions
      B
      BillW
    • RE: Anyone know how to convert old Vectorworks files to dwg?

      What version of Vectorworks have the files been saved as? Or are they pre Vectorworks ie MiniCAD. Are the files big and is it one dwg per vectorworks file or are there multiple saved views or saved sheets that need to be converted?

      posted in Extensions & Applications Discussions
      B
      BillW
    • RE: New adventures in Sketchup Snobbery

      I am afraid some (but not all) architects can be a bit precious (and I am an architect by profession)

      It also works the other way. I have built most of my big models in Studio Max and do exactly what you did - rebuild existing models (particularly Microstation). There's nothing worse than hacking another persons model - most of the time it can be quicker to remodel anyway.

      Did you supply the model back in Studio Max format? That's probably what he wanted.
      A 3DS file would be a pain for him as Sketchup transfers materials as multi sub object materials which requires a lot of work to split if you dont have any Maxscript tools.
      I bet a lot of professional imaging houses would do the same with your Sketchup model.

      Put it down to experience.

      Take a look at my last model at http://www.ballymore.co.uk High Point, Hayes listed on front page.
      Oh and by the way, I still love Sketchup, including scripting in Ruby.

      Bill Wood

      posted in SketchUp Discussions
      B
      BillW
    • RE: Worth the effort - Rendering?

      @unknownuser said:

      It helps me decide if Max Version 7 or 8 is worth the effort, especially since I also need to make some simple flythru's as well.

      I like SU for it's simplicity but I would question the responsiveness in handling large models. With Max (even at 7/8) you can handle very large models, there is an inbuilt xref system for files and objects and sometimes I prefer Max for editing models. There is a different way of modelling using layered (non destructive) modifiers which allows you to backtrack up the modifier tree. I also swear by the sweep modifier - a little like followme but you can edit the path and swept shapes seperately and the path doesnt have to be contiguous.

      It is a testament to Max that some SU (ruby) tools have their roots in MAX ie SketchyFFD

      From Max 8 onwards, I wouldnt say there has been a vast usability improvement in releases. Rendering wise Vray seems to be the tool of choice for many professionals. It's your choice!

      posted in Extensions & Applications Discussions
      B
      BillW
    • DC components and ruby

      Just to pass on my experiences.

      I thought I would convert one of my plugins to use DC components which look perfect for editing afterwards. The DC components in question allow scaling in only one axis.

      On calling the plugin, I copy into the current file a virgin DC component (if necessary), place as the user has specified with screen hits and edit the DC to match the length required as shown in the code below. Note: I built the DC in centimeters which requires some mod to the value passed, although looking at it now I guess values are always passed in inches.

        # set DC attributes
        compdef = comp.definition 
        ad = compdef.attribute_dictionary "dynamic_attributes"
        divlen = (ad["_lengthunits"] == "CENTIMETERS") ? 2.54 ; 1.0
      
        shedlen = ((@numbays * @baysize) + (@curoutloff * 2)).to_cm / divlen
        ad["_leny_nominal"] = shedlen.to_s
        $dc_observers.get_latest_class.redraw_with_undo(comp) 
      
      

      All fine and dandy as the user can use the scale tool to modify the length.

      The problem is that the DC component mechanism puts such a heavy load on building the geometry that what
      is pretty much instantaneous with my SU6 version which does the build within the plugin, the DC component takes 20 seconds to build. I suspect there is a bucket load of observers to manage.

      I am now thinking of reverting back to my previous version and see if I can reuse the DC Component>Component Options code to have a version specific to my plugins which at least allows value changes.

      For the guys at Google, in a perfect world, I would like to have a simple way of incorporating a Component>Component Options dialog (maintained by Google) into my code with hooks for calling my draw code. In my time, I have done a lot of Vectorworks plugin development and by way of comparison, setting up a plugin interface is very easy.

      posted in Developers' Forum
      B
      BillW
    • RE: DC parameter checking

      Remus

      Thanks for the response.

      My stance is that the topmost component will always contain the source information to build the DC.
      Generally, the most important will be a Len attribute derived after scaling. In my case, I round to the nearest bay size based on a LenY for the topmost component.

      That is why for nested components I use the parent! reference - the LenY for a nested component may be different to that of the topmost component - you may also want to fix Len values. All I was protecting myself against was the user exploding the topmost component and breaking links in the nested components (ie those with the parent! reference)

      If I was to use raw attribute names in a nested component, can attributes of a nested component be set from within the functions of the topmost component? I suspect not.

      Dont worry, I can happily live with the exploding issue.

      As a note, I attached a custom attribute to a nested component with display set to "edit as textbox".
      When the topmost component is selected the Component Options dialog doesn't display the custom attribute from the nested component - which is what I expect.

      posted in Dynamic Components
      B
      BillW
    • Problem with copies and layer assignment

      I have a problem with copies not assigning the correct layer to copies above the first copy - see attached.

      The component below the topmost component has a layer "Structure" which contains nested components assigned to "Layer 0". The copies above 1 use the nested components layer assignment rather than their container component's layer.

      I think this is a bug. Does anyone want to confirm?

      I can fix it I think by assigning the nested components layer to "Structure"


      copies and layers error.JPG

      posted in Dynamic Components sketchup
      B
      BillW
    • DC parameter checking

      I have been working on a number of DC's many having nested components.

      I am using the parent referencing (ie =parent!noofbays*500 ) quite heavily as changing the component reference names can affect links down the tree.

      What I am bothered about is if the user explodes the top level component, I want to keep the functionality in the nested components. This would require a switch to check for the existence of the parent with a function line such as

      = IF(EXISTS(parent!noofbays),parent!noofbaysparent!baysize,localnoofbayslocalbaysize)

      Has anyone found a way to do this sort of check?

      Also, I havent checked but I assume parent! is the containing component. I wonder with multiple nested levels whether parent! refers to the topmost component or the one containing the current component as assumed above. If so to get up the tree do you use parent!parent!noofbays . I suppose you can use direct name references for the topmost parent anyway. This query is done just to raise debate - I haven't checked yet.

      Regards

      Bill Wood

      posted in Dynamic Components sketchup
      B
      BillW
    • RE: [Req] Texture Corrector.... PLEASE

      So, from what I understand of the plugin, it takes the real world co-ordinates of four point and their >>UV mapping, which then is transferred directly to the other side? And it doesn't require the face to >>have four vertices because you sample four points out of the total points and that's enough to place >>the texture correct?

      Exactly how it works. However, I think it may fail with a face of only 3 vertices though. I didint check the UVHelper data - it just worked.

      Bill Wood

      posted in Plugins
      B
      BillW
    • 1 / 1