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

    Posts

    Recent Best Controversial
    • RE: [Req] For somebody to please make this plugin

      Ok the model is exported to fusion 360, it wasn't to hard to do and there weren't to many errors and those were easily fixed (some components were exported twice).

      If you use the export option, the best result will most likely come from dxf (I used 2014 but I think 2012/2013 will give the same result).
      The best things was that Components and nested components will still be components and nested within the right components in the fusion 360 file (except for the minor errors mentioned).

      So far it seems like a decent solution.

      One big issue though, it seems to crash a lot which is really frustating

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      Hey everyone,

      I finished my model about 2 days ago and now trying to see if I can export it to fusion 360 (however importing doesn't seem to be possible in the trial version).

      Will keep you guys updated and tell you what the out come is.

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      Thanks Pilou, I'm going try that as soon as I have some time (entering the busy period of my exam weeks right now :p).

      I know I should add some tolerances but since I'm using wood and because it needs some sanding anyway that is not a problem. Also the biggest difference why I only need minimal tolerances is because the surfaces only slide over each other (with Burr puzzles you have to manage to put them together and try to put them inbetween other pieces). On top of that I will try to cut (by a laser) the majority of the pieces that slides within other out of the same woodpanels. Doing it that way will automatically provide tolerances between those pieces because the laser cuts part of the wood away.

      I would still be very happy with the plugin I requested.

      @Sdmitch it's a nice plugin but for what I want it's not the best want since it will be too hard to keep track of the over 150+ scenes. Thanks anyway

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      @sdmitch said:

      I can't see/find the screen shots but there is another problem. Sketchup scenes only save the camera position and visible layers it does not save the position of objects in the model.

      Sorry uploading failed, they're are attached now.

      I know but there are plugins that do this (however some require you to do a screen capture, which is not really a big issue), by example https://sites.google.com/site/morisdov/

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      @Pilou,

      I know puzzle should be designed with tolerances, but I don't I design them with a perfect fit than later on during assembly I sand the wooden panels sligthly which introduces minimal tolerances.

      Let me try to be a bit clearer I do NOT need a program/plugin that solves the puzzle box. I have the solution in my head. What I need to do is make the box go through the solution sequence to make sure I didn't make any design errors.

      Autodesk might be realy useful if there is an easy and good way to export everything to autodesk cad (so that things are actually exported as surfaces and not surfaces).
      The biggest issue however is that the "joints" in my box do not belong to any of the standard joint in joint fusion.

      @Sdmitch
      I've added two screenshots this is almost the final product (without checking and testing) but still needs some finishing and final changes.
      puzzlebox_screen.png
      puzzlebox_screen_solids.png

      (notice that somethings are not modeled here on purpose, those things being small springs and 2 metal magnetic balls.)

      Now probably you will still not understand how this works and functions from just seeing the screenshots (that's why I didn't upload them before). That is because it is an extremely complex puzzle box nonetheless the basic mechanisms are the same as described here:
      http://www.instructables.com/id/My-first-puzzle-box/step3/Layers-into-depth/
      you can also take a look at the following links
      http://homepage.ntlworld.com/bruce.viney/
      http://www.instructables.com/id/Creating-a-Puzzle-Box/

      As Jeff said I'm looking for quite this exact plugin the reason being if I have to use semi-solution it's not going to save me a significant amount of time and head-ache, meaning that I can just work with I already have.

      Most of the mover/animation scripts I had already found because normally I try to look for something first. The reason I requested is because I already asked around and searched for a script that had those functions and couldn't find it.

      Now I can program a little bit but I'm just a novice, considering that I don't know Ruby and the sketchup API (which can be really annoying) it has proven to be too great of a challenge to program it myself.

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      @pilou said:

      You said that you want to know if there is only one solution...
      Seems there are 150 movements
      So if there are at each turn 20 possibilities ( or more?)
      That makes 20 power 150 theoric possibilities to examine!
      something like a number of more 195 numbers! πŸ˜‰
      Atoms in univers is something like 10 power 100 ! (100 numbers) πŸ˜’

      I didn't say that πŸ˜‰
      I said that I need to check if it works, meaning that the solution I have should work. (trust me there's about only one best solution)
      What this means that I need to check that if the puzzle is moved through all the steps for this solution it is actually solved and does not get stuck because I made an error in the design.
      If I made a calculation error somewhere that means some dimension of the puzzle might be off by 5 or 10 mm, that is why I need to do this. Next to that I won't to get an animation of the puzzle solving being solved.

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      I'm sorry driven but as I've tried to explain before that plugin doesn't do the trick either 😞

      @pilou, nah don't need a solver, I made it so I know the solution πŸ˜‰
      However I need to check if it works properly so that I can fabricate it without worrying about that.

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      Yes I looked at both mover and view parts (have both of them installed as well).

      But as I said πŸ˜‰

      @unknownuser said:

      there is no plugin that checks what the distance till touch along an axis is and then moves the components that distance along the axis.

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Req] For somebody to please make this plugin

      I have looked for scripts but there is none that does this specific thing.
      SUsolid does only 1 thing and that is highlight intersections.
      There are some animation scripts that allow you to animate moving object.

      But there is no script that checks for intersections, then moves the components/solid along an axis till touching and generates a new scene for this to add to the animation (and then rechecks if there still aren't any intersections).

      So yes seperate plugins exits for checking intersection adn for creating animation with components at different places (however I believe some of those animation plugins can only go up to 9 positions or so). However there is no plugin that checks what the distance till touch along an axis is and then moves the components that distance along the axis.
      More importantly it is impossible to combine these script since most of them are encrypted meaning that it is unknown how the functions work and under what name you can call upon them to use them.

      It's not that all parts of this script are entirely new it's just that functionality I need does not exist. Which is a combination of moving pieces with a collision test and generating that into a animation.

      I'm designing a puzzle box (enough to find on the internet http://www.youtube.com/watch?v=VRUSSY8v6PU) and in comparison to most puzzle boxes which have somewhere between 10 and 50 moves mine in going to have over 150 at least (last time I checked a little over 200). Meaning that if I have to do every check by hand and every movement by hand it's going to take a long while, something that only saves me 10 to 20 seconds per move will end up saving me half an hour or more of frustating agony and possible human errors. Considering I get tired and annoyed this plugin would probably save around 4 to 6 six hours of work for me. Especially work I really dislike because it is so tedious. I don't mind paying for something but not if it only does about a quarter (or less) of the work as is the case for SUSolid.
      Nonetheless because this is a big puzzle box I'm designing and because it requires a lot of material I want to make sure it has no errors before actually producing it.

      posted in Plugins
      B
      Bobvandevoort
    • [Req] For somebody to please make this plugin

      Hey everyone,

      I have been trying to make a certain plugin myself but found out that it is too time consuming and too hard because I don't have enough programming experience, especially in ruby and the skecthup API.

      Now I'm willing to pay around 30€ if the plugin is made properly (I believe this is somewhere around 35 to 40 dollars) but until I have seen the plugin work and even work with my model (can send it to you for testing when you have it done.

      What I want in the plugin in the following.
      It should check that all solids for intersections with other solids (THIS DOES NOT INCLUDE TOUCHING).
      This should be available as a seperate check but normally it should occur at the beginning and end of the script. When an intersection occurs a warning windows should pop up only if their is an intersection (would be nice if the warning windows would be toggable).
      It should have a window with at least 6 buttons for moving till hit, X_axis, -X_axis, Y_axis, etc.
      When clicking one of those buttons it should:

      1. Make a new scene
      2. Check for any intersections
      3. move all selected components (and thus nested) a certain distance only in this new scene so that when you play the animation the components move throughout the scenes
      4. Check again for any intersections
        This certain distance is the distance from a component(face) to the closest next component(face) in a certain direction (x,y,z axis and reverse directions) (I migth have an idea as how to test this distance). What this basically means it moves all the selected entities as ONE unit the same distance until the first hit/touch along the direction it was supposed to move.

      A way to export the animation (if it's not possible to do so throughout sketchup would also be nice).

      A few more things I want to make clear is the following,
      I have a lot of nested components in my model and can't tell how deep the level of nesting is and there are about 130 solids in my model. The intersection method has to work really well and zooming in or any othewr to show the intersection is a big plus. Another plus is saving the new position in a new scene of the model/selection should the automatic move till touch function fail.
      I don't expect the script to be super fast but I don't want to wait more than a minute for everything I run the move button.
      What I mean with solids is the following, it is a component with no other components inside and skecthup will consider it a solid. In other words a component of the lowest level and that can be operated on with the solid tools from sketchup.

      Now I would like to know if anybody is willing to and CAN make this.
      If you are willing to do so it would be nice to know how long it would probably take, e.x. 2 weeks, a month, 2 months, 3 months, more?

      I know it isn't a huge amount of money but I don't want to spend too much on this since afterwards I still need to buy the materials that will have to be lasercutted (which are going to be expensive).

      I hope to hear form you soon πŸ˜„

      posted in Plugins
      B
      Bobvandevoort
    • RE: Help requested for checking all nested instances

      Ah I'll try to be a bit more specific.

      Let's say I have a model with 3 components, comp1, comp2 and comp3.

      comp1 has comp2 inside and comp3 is inside of comp2.
      This then means (if I am correct) that comp1 has a transformation, called trans1, comp2 has one called trans2 and comp3 has one called trans3.
      If I take comp3 and place it in the model with its own transformation, trans3, it will not be places at its original position in the model. To achieve that it needs to have its transformation multiplied by trans2 and trans1.

      So now I want to create a matrix "noembed" that only has components that have no other components nested inside them (like comp3 here). However these components should still retain there original location/position in the model meaning their own transformation should be multiplied by all their parent's transformations.

      In which case this code seem to do the trick

      cd.instances.each{|ci|
       next unless ci.parent==mod
       trans_matrix << ci.transformation
       noembed << ci
      }
      
      posted in Developers' Forum
      B
      Bobvandevoort
    • RE: Help requested for checking all nested instances

      Would this work to get an array with all components of the level (aka no other nested components) that are in the same position as in the model?

      		noembed=[];
      		cds.each{|cd|
      			if cd.instances[0]
      				embed=cd.entities.grep(Sketchup;;ComponentInstance)
      				trans_matrix=[]
      				if not embed[0]
      					cd.instances.each{|ci|
      						next unless ci.parent==mod
      						trans_matrix << ci.transformation;
      					}
      					trans_matrix.each{|tr| 
      					cd.instances.transform! tr}
      					noembed << cd.instances
      				end				#### does this give the right transformation
      			end
      			}
      
      posted in Developers' Forum
      B
      Bobvandevoort
    • RE: Help requested for checking all nested instances

      Ahhhh
      of course that's what I forgot about.

      I want the components to have their original position in the skecthup model, so that means they probably need to be transformed by their own and all their parents transformations.

      posted in Developers' Forum
      B
      Bobvandevoort
    • RE: Help requested for checking all nested instances

      Ok yeah already thought it was something like that πŸ˜„

      anyway this is really helpful but for some reason when I do the following I get the wrong transformations

      noembed=[];
      cds.each{|cd|
       if cd.instances[0]
        embed=cd.entities.grep(Sketchup;;ComponentInstance)
        noembed << cd.instances unless embed[0]  #### storing the instances as I need those
       end
      }
      
      noembed.flatten! # making the array workable
      
      posted in Developers' Forum
      B
      Bobvandevoort
    • RE: Help requested for checking all nested instances

      @sdmitch said:

      Model definitions list with groups and images removed

      mod = Sketchup.active_model
      > cds = mod.definitions.reject{|cd|cd.group?||cd.image?}
      > 
      

      Select all component instances

      cds.each{|cd| cd.instances.each{|ci|sel.add ci}}
      

      Array with all the components that have no nested components.

      noembed=[];
      > cds.each{|cd|
      >  if cd.instances[0]
      >   embed=cd.entities.grep(Sketchup;;ComponentInstance)
      >   noembed << cd unless embed[0]
      >  end
      > }
      > 
      

      Hey man Thank you very much πŸ˜„

      However I have 2 questions, the sel.add in the 2nd code block seems to be wrong or refer to something else, can somebody check that please?

      Also what does the << operator do in this case?

      posted in Developers' Forum
      B
      Bobvandevoort
    • Help requested for checking all nested instances

      Hey everybody I need some help with the following because I have a hard time figuring out how to program the following (mainly because I lack experience in programming with Ruby and ofcourse sketchup).

      I need to select all instances in the model and this means top-level components (parents) as well as the deepest nested components, I understood that you can do this with a definition list or something but that was a bit unclear to me.

      Than I need to make an array with all the components that have no nested components. This prevents double checking components and errors while using the intersect function (the solid tools function).

      What I'm trying to make is the following

      @unknownuser said:

      Hi everyone,

      So I haven't been able to find a plugin that checks something crucial in my opinion.
      If you are designing a 3D object with movable parts it can sometimes be very important to check if solids (or components) intersect (or maybe touch). This is especially important if you have a high number of parts or moving parts. An example I can give of this is something I'm working on, it is a puzzle box. A puzzle box is a box that has sliding components on different sides on the box, called sliders. If you move when one these sliders you want to be sure it doesn't get blocked by another part (aka intersecting), because if it's unintentionally blocked than you can't open the box.

      Something that would be even more usefull is if a part(component) could be moved (or rotated)along an axis until some part of it hits another component (this would make checking even easier).

      This can ofcourse be applied to much more cases, mostly mechanisms that need to be check if they having moving parts, a clock, a model engine, etc. To see if the device can actually operate.

      It would be even handier (also has a lot of other applications in building models) if you can move a component along the axes (either positive or negative) until it touches the next piece (component) and have it stop there. This easily shows if it can move along the intended path.
      It should check inner components touching and not just the surrounding (encompassing) parent component boxes.

      So what's on my to do list:

      1. Making the intersection test work for nested components.
        (add functionability to disable and enable a popup screen if an intersection is found and possible zoom in on it)
      2. Make a function (def) that add's a new scene.
      3. Make a function that can calculate the distance from a component(face) to the closest next component(face) in a certain direction (x,y,z axis and reverse directions). (I was thinking about a raytest, using a grid of lines based on my mininum feature size to do this per face of the component that is on the right side for the direction)
      4. Use this function to move the the component and everything included in the selection this much distance and that do another intersection test and give a warning if an intersection is found.
      5. If this all works combine it with the a moving animation plugin (maybe this one http://sketchucation.com/forums/viewtopic.php?t=17459 or another one that has the code visible so I can see what the def's are called)
      6. Make sure that this works all together (will only work for components though) add a small interface with options and buttons. 6 buttons for moving till hit, X_axis, -X_axis, Y_axis, etc. Will probably add a checkbox for no warning pop-ups (if it's not too hard) maybe a checkbox to just move and not creating a new scene with the saved position. Maybe adding a button just to check for intersection.
      7. Extra stuff that might happen in some real far feature automatic moving on click through check for possible paths and not going back where it came from, automatic animation export, adding group functionability and maybe more
      posted in Developers' Forum
      B
      Bobvandevoort
    • RE: REQ: Checking if components (solids) intersect

      This is my version of the srcipt for now that seems to work for all non nested component instances

      module Bob
      
      # Huge parts of this code were written by TIG this is a sligthly modified version
      
      	def self.intersectBob?(e1=nil, e2=nil)
      	
      		mod = Sketchup.active_model # Open model
      		ent = mod.entities # All entities in model
      		instance1 = e1 #sel[0]
      		instance2 = e2 #sel[1]
      		ci_def = instance1.definition 
      		tr1 = instance1.transformation
      		test1 = Sketchup.active_model.entities.add_instance ci_def, tr1
      		ci_def2 = instance2.definition 
      		tr2 = instance2.transformation
      		test2 = Sketchup.active_model.entities.add_instance ci_def2, tr2
      		result = test1.intersect(test2) 
      		cnt = result.entities.count 
      		if  cnt > 0
      			int=true
      			result.definition.entities.each {|ent|
      			if ent.is_a? Sketchup;;Face
      				ent.material = 'red' #Sketchup;;Color.new(255, 0, 0)
      			end}
      		else
      		int=false
      		end
      		
      	return int
      	end 
      	
      	#def self.del()	#does not work like this typing Bob.del into the ruby console, meaning result has to be changed from local to global variable but I don't know how yet
      	#result.erase!	
      	#end	
      
      	def self.intersectALL()
      		model=Sketchup.active_model
      		ss=model.selection
      		ents=model.active_entities
      		ss.clear
      		gps=ents.grep(Sketchup;;Group)
      		ins=ents.grep(Sketchup;;ComponentInstance)
      		ens=gps+ins
      		ens.uniq!
      		ens.compact!
      		(ens.length).times{|i|
      			(ens.length).times{|j|
      				next if j<=i
      				if self.intersectBob?(ens[i], ens[j])
      					ss.add(ens[i])
      					ss.add(ens[j])
      				end
      			}
      		}
      		puts "Any intersecting component-instances are highlighted..."
      	end
      end
      
      

      In this script I still need to fix the deleting function which later will have to be added to an observer class so as soon as another is clicked (or a button is pressed) the resulting intersection is deleted.

      The more important function that still has to be added is that it does the check for all the nested components (and possibly groups).

      @giro
      I only have the 32 bits version so can't say

      posted in Plugins
      B
      Bobvandevoort
    • RE: REQ: Checking if components (solids) intersect

      @tig said:

      It's not Face.material = 'red'
      it'd be ent.material = 'red'

      Thanks this solved it πŸ˜„

      Btw there's a way to do it with the intersect_with function and rule out most of the touching elements.
      Any 3d volume needs at least 4 faces, so do a face count for ges and see if it equals 4 or more.
      I know there probably some odd situations where it would still only be touching but then you could check if the faces form a solid if it doesn't form a solid it's a touch (I think this should be a correct way to implement this).

      Let me know your thought about this method πŸ˜‰

      (in any real 3d modeling you only need to find volumetric intersections and if you also want to find out of they are thouching we already have the method you previously described.

      Everybody else thanks for the response and sorry for the delay on my side with responding, I have been away for 2 days.

      posted in Plugins
      B
      Bobvandevoort
    • RE: REQ: Checking if components (solids) intersect

      Thanks for the really awesome explanation.

      I know a way that works (and just finished writing it) however it requires the pro version.

      I wrote it "ruby code editor" plugin and there for used the selection in the model to set the two components. (link http://www.alexschreyer.net/projects/sketchup-ruby-code-editor/)

      it works good so far only got a little error when I try to turn the material red of the intersecting component part.

      mod = Sketchup.active_model # Open model
      ent = mod.entities # All entities in model
      sel = mod.selection # Current selection
       instance1 = sel[0]
       instance2 = sel[1]
       ci_def = instance1.definition 
       tr1 = instance1.transformation
       test1 = Sketchup.active_model.entities.add_instance ci_def, tr1
       ci_def2 = instance2.definition 
       tr2 = instance2.transformation
       test2 = Sketchup.active_model.entities.add_instance ci_def2, tr2
       result = test1.intersect(test2) # I can delete this later using something like an observer but would have to figure out how that works, also need to figure out how to make this work for more than 2 components and I need to figure out how to do it (multi)nested components.
       cnt = result.entities.count 
      if  cnt > 0
       int=true
       result.material='red'
         # result.definition.entities.each {|ent|           ###When I run this in the plugin in console I get the following error "Done. Ruby says; uninitialized constant AS_RubyEditor;;RubyEditor;;Face"
         #   if ent.is_a? Sketchup;;Face
         #    Face.material = 'red' #Sketchup;;Color.new(255, 0, 0)
         #  end}
      else
       int=false
      end
      
      #return int
      
      

      If I run the code normally I get the following output "Done. Ruby says: red"
      However the faces aren't red they just stay the original color.

      posted in Plugins
      B
      Bobvandevoort
    • RE: REQ: Checking if components (solids) intersect

      Hey TIG,

      Thanks a lot again that is really helpful πŸ˜„

      Three more things though, one I do have nested components (otherwise my model is unmanageble) which makes it troublesome to use it like this in my final script. (btw I only use components)

      Secondly what if I just want to find intersecting components (groups/element) and not also touching ones.

      The last thing is I now understand both codes except for a part concerning the first script

        grp = ens.add_group()
            grp.transform!(tr1) ### so can see cut lines IF erase! is disabled at the end !
            ges = grp.entities
            es1.intersect_with(true, tr1, ges, tr1, true, e2)
            if ges[0]
               int = true
            else
               int = false
            end
      

      A few things here, sometimes the intersection lines fail to show up. (this is when I have nested component but these components are not touching or intersecting anything)

      the intersect_with is still unclear to me.
      we make a group of the first entity 1 which we call grp
      then do a transformation (now is this a simple translation or a true transformation and how should I envision that in skp)
      We say ges= the entities that were transformed
      Now we intersect all the entities in ges with e2, which if an intersect occurs removes all elements from ges as for as I understand. However what's the reason the es1.intersect_with.

      Also why can't we by example use something like this

      
      
      result = e1.intersect(e2)
      if result == nil
         int = false
      else 
          int = true
      

      Please keep in mind this is my first time doing any programming in ruby and for SU, so I had to read up on some of the coding before I could reply.

      Thank you very much for the help πŸ˜„

      posted in Plugins
      B
      Bobvandevoort
    • 1 / 1