sketchucation logo sketchucation
    • Login
    1. Home
    2. Bobvandevoort
    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!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 28
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: REQ: Checking if components (solids) intersect

      @tig said:

      Assuming they do/could overlap, then you need to check for geometry intersections.
      Try this - you pass two arguments - references to a group or component-instance - returns ' true' if they do intersect|touch, or ' false' if there is no intersection [or 'nil' if incorrect arguments]: e.g. TIG.intersect?(e1, e2)

      module TIG
      > 	def self.intersect?(e1=nil, e2=nil)
      > 		if e1.is_a?(Sketchup;;Group) || e1.is_a?(Sketchup;;ComponentInstance)
      > 			if e1.is_a?(Sketchup;;Group)
      > 				es1 = e1.entities
      > 			else
      > 				es1 = e1.definition.entities
      > 			end
      > 			fail = false
      > 		else
      > 			fail = true
      > 		end
      > 		if e2.is_a?(Sketchup;;Group) || e2.is_a?(Sketchup;;ComponentInstance)
      > 			fail = false
      > 		else
      > 			fail = true
      > 		end
      > 		if fail
      > 			puts("#{self}.intersect? requires references to two groups/component-instances.\nReturns 'true' [intersecting || touching] or 'false'.")
      > 			return nil
      > 		end
      > 		ens = e1.parent.entities
      > 		tr1 = e1.transformation
      > 		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
      > 		grp.erase!
      > 		return int
      > 	end
      > end
      

      Note that they do not need to be 'solids', but a check for that could be added...

      That seems really nice and cool but I've never worked with ruby nor the ruby interface in sketchup.
      I do have some basic coding skills in C (and some other languages).

      Does it matter that instead of having groups that I have components (as far as I understood it doesn't).

      SUSolids sees all my components as solids at the moment so if that is what you mean by solid than yes all my components are solids.

      Furthermore I understand the code more or less up till the checking if there're actually 2 components selected. After that it's a bit unclear how it checks for the intersection (it seems like you're using the intersection tool but the arguments are unclear).

      Further it should be possible to just use a for loop to check the whole model for intersections right?


      One other thing would it be possible to check for only touching between just 2 components (multiple would be better) in a certain plain (of 1 of the components).

      So let me explain that a bit more correctly by first telling what I want to use the check for. I want to make a move command/script/tool that moves 1 a component along an axis (both direction being possible) until it collides with another surface/component. This means that if a component is moved along the x-axis it should only look if it's touching any other components in the x-direction (or an yz-plane). Meaning if I have a rod in a cylinder with their longitudinal axis in the x-axis and I let the rod be moved/translated along the x-axis than even if their walls are touching in the y or z direction it should stop the translation. The translation should be stopped as soon as an intersection or a touch at base of the rod touches and yz-plane is detected.

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

      Oh btw if anyone has anymore more suggestions please share them.

      (using Sketchy Physics is going to be a lot of work, btw anyone no how to make objects only move when you drag/click them, so that they don't react to gravity)

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

      Thank you guys very much, the combination of SuSolid and Sketchy Physics should do the trick.

      Once I finish my work I'll show it πŸ˜‰

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Plugin] SuSolid for 3d Printing (updated April 2014 )

      @jgb said:

      Re: 2nd question.

      SU already does "touching" indications when moving a comp towards another comp.
      You need only grab the moving comp and when you move it into contact with the stationary comp, SU will flag it touching face or edge. You can move past that of course, but the move will hesitate a bit when the contact happens.

      If you are contacting faces, then you can make one face a "Glue anything" and it will contact and stay put.

      Thanks but it not exactly the same. If I were to moving an object along the z direction it might already by touching something on the left or the rigth that's in parralel with the movement direction. This will in reality only cause friction and not prevent the movement from happening (solvable for wood by sanding). Making this technique you described extremely hard to use and almost impossible if we talking about cylinders nested in bigger components and the cylinder is the object touching something.

      My main problem with using this is that it is really prone to errors, because I'm checking it by eye and I'm human (the amount of movements I have to checks is over 150).

      Anyhow, still thanks for the tip πŸ˜„

      posted in Plugins
      B
      Bobvandevoort
    • RE: [Plugin] SuSolid for 3d Printing (updated April 2014 )

      Hi Voljanko,

      I have two questions.

      First is there any other way than to pay by paypal (because otherwise I need to pay an extra 5€ just to charge a paypal account)?

      Second question/suggestion is a little more complex.
      Since The tool can check for intersection between solids it should also be able to check for touching solids (which on its self is not that useful) but I was wondering if a tool or function could be added (or maybe created by some else) that makes it possible to move components (my components are solids, so solids) along an axis until it touches the next solid in that direction (so as soon as it would be prevented in real life from moving any further).

      Greetings,
      Bob

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

      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 ot 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.

      In the pdf file ans skp you can see what I mean with intersecting and touching.
      Intersecting1.pdf
      Intersecting.skp

      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.

      posted in Plugins
      B
      Bobvandevoort
    • RE: Problems exporting 2D images .png .jpg and layout

      Thanks,

      But I found out it didn't work for me.

      Changing the rendering method from raster to vector, did work for some strange reason (this also explains why exporting it as a .pdf does work and exporting it as an image doesn't).

      Any idea how to solve the problem, especially for when I directly export images from sketchup?

      posted in LayOut Discussions
      B
      Bobvandevoort
    • Problems exporting 2D images .png .jpg and layout

      SO hi everybody I'm having some trouble with exporting 2D images and importing models into layout.

      The problem is the same for all occasions (not it does not occur when exporting as a pdf).

      The problem is as following everytime I export an image only the lines are displayed in the image, the faces are either not exported or exported completely white.

      I've tried several things, changing styles, importing into layout.

      I can't seem to find where the problem come froms or where how I could it.

      Is there anybody that can help me?


      Example.png


      Example.skp


      Example.layout


      pdf made from the layout file NOT from the sketchup file

      posted in LayOut Discussions layout
      B
      Bobvandevoort
    • 1 / 1