Shear object?
-
I don't understand the difference between what u say and the scale tool applied on a group or component ?
Oh maybe you want a part of it stay in place and the rest strech, like the stretch command in Autocad ? -
Sorry if I was a bit unclear. English isnt my native language so Im unsure what the correct word is.
I mean distorting a object by moving points in a lattice surrounding it like a bounding box. With user control over how many lattice points there should be.
There is also a "simpler" way called shear in some software that works like if you were moving on side of a box one way and the opposite side the opposite way and you would end up with a sheared (distorted) box that looked like a parallelogram.
http://docweb.khk.be/Marc%20Keersmaekers/marckee/pav/oeF/stijn/Vaardigheden/Oppervlakte/parallellogram.htmI have often wished for a tool like this in SketchUp.
-
Hi Fredo!!
Your plugin is really interesting!!
The only problem is that every time i make a shear... the new object appears with hidden lines..This plugin can be converted into a Lattice tool?
Daniel S
I attach images from:
http://homepage.ntlworld.com/papermodels/meta/docs/commands2.htm
-
@daniel s said:
The only problem is that every time i make a shear... the new object appears with hidden lines..
My mistake, as the macro is not fully tested. I reloaded the Zip file with correct behavior (I hope).
@daniel s said:
This plugin can be converted into a Lattice tool?
Yes. That's what I call the NULT Box, which is a downgraded version of lattice tools you can find in many 3D design tools (such as Blender), as the deformed box must keep its 6 faces planar. What I am working on is the GUI to specify the deformation. The transformation algorithm is exactly the same as for Plane shear (i.e. based on vertex non uniform translation).
-
Awesome!!!
The updated PlaneShear.zip works fine now...
Thank You!!!Daniel S
-
CPhillips was playing around with somethng similar http://www.sketchucation.com/forums/scf/viewtopic.php?f=57&t=2570&start=0&st=0&sk=t&sd=a but SketchyPhysics is a bit distracting. It's good to see this sort of tool revived.
-
Wow.
I didnt think I would get such a great answer so fast. Thanks!
Looking forward to the nult box also.
I think it would be a good idea to let the plane shear also have a "deformation box" so that you could use it more like a tweak tool and try different amount of shear (something like the scale tool).
The current version is more suited for use with a known amount. In my humble opinion.
Anyway, thanks again! -
Coincidentally, I am currently working of this type of transformation which I call Non Uniform Linear Transformations (NULT), that are not native in Sketchup and end up recreating the drawing element.
I had completed the Plane Shear a while ago and need to finish the box shear.
Plane Shear is actually a transformation that would deform a rectangle into a parallelogram (in 3D space). Box shear, is a variant that allows non uniform scaling, typically transform a sphere into an egg. The question here is more how you specify what you want to do (my current idea is to do it via a transformation box)
Attached in the Plane Shear. You specify the plane, the reference direction and the angle. This is why the tool behaves pretty much as a Protractor tool. The tool applies to the Selection, but you can include what you want in it (groups, components, images, etc...) at any nested level. It preserves and deforms textures, as well as layers, attributes and properties. The only restrictions are:
- Components are transformed into Groups, because there is no way to preserve the component definition for all instances, as they may be rotated and scaled
- Images are transformed in planar face, with the image texture sheared (Sketchup does not support images in parallelogram as far as I know!)
- Dimensions are not transformed because Sketchup does not provide a Ruby API for these objects
- Interestingly, the transformation preserves Bezier and other Spline curves
Here is a basic example with a simple parallelepiped, but you can find a more complex situation at http://escargot-archi.eu/forum/viewtopic.php?t=2299 (a French site, but the image is self explanatory). For this kind of objects with 1,400 faces, it takes longer (the macro has a progress bar anyway).
There is no documentation at the moment, and this is why I do not publish it yet.
The Zip archive attached contains 5 files, all to go to the Plugins Directory:
- Nult.rb, the main macro
- LibProtractorTool.rb, a utility to emulate the Protractor tool (if anyone interested, it can be used as an independent tool for other purposes).
- LibTraductor.rb, a utility to language translation. You may already have it with the Bezierspline macro, but this one is more recent and anyway compatible.
- LibTraductor.def, an optional configuration file to force language.
- **iconshear.png**which is for the toolbar button
- **cursorshear.png**for the cursor shape
Feedback welcome. Thanks
Fredo
-
@pixero said:
I think it would be a good idea to let the plane shear also have a "deformation box" so that you could use it more like a tweak tool and try different amount of shear (something like the scale tool).
The current version is more suited for use with a known amount. In my humble opinion.
Anyway, thanks again!It would be very difficult to consider an interactive deformation of the model. Keep in mind that the transformation reconstructs the selected portion of the model, face by face, edge by edge, etc...., as there is no native transformation in Sketchup doing a shear (i.e. a non uniform offset).
However, what I have done is to show interactively the deformation of the selected model in wireframe mode. This is much lighter and performance seems acceptable.You need to download the 2 attached files nult.rband LibProtractorTool.rb.
version with interactive wireframe deformation
-
@gata said:
CPhillips was playing around with somethng similar http://www.sketchucation.com/forums/scf/viewtopic.php?f=57&t=2570&start=0&st=0&sk=t&sd=a but SketchyPhysics is a bit distracting. It's good to see this sort of tool revived.
I semi-finished that thing I was working on. Problem was that it was really slow a reasonable size model could take minutes to update. Maybe someday I'll go back an optimize it.
Shear looks like a handy tool to have!
-
@cphillips said:
@gata said:
CPhillips was playing around with somethng similar http://www.sketchucation.com/forums/scf/viewtopic.php?f=57&t=2570&start=0&st=0&sk=t&sd=a but SketchyPhysics is a bit distracting. It's good to see this sort of tool revived.
I semi-finished that thing I was working on. Problem was that it was really slow a reasonable size model could take minutes to update. Maybe someday I'll go back an optimize it.
Shear looks like a handy tool to have!
I think your Free Form Deformation ballon is really one big step forward, because I guess it implies to handle the individual deformation of faces and edges, and then to re-arrange the topology of the model to keep meaningful geometrical continuity. In comparison, PlaneShear is just a linear offset of vertices that keep faces as faces and edges as edges, without any individual complexification.
Bon courage! I am quite admirative and impressed by what you can achieve with SketchyPhysics!
-
Great update...Thanks.
It´s much better to see interactively the deformation.
The icons for this and the JJP toolbar are 32x32. I think SketchUp uses 24x24.
I have made this icons for me and perhaps somebody like them, so i post it here.Daniel S
-
Daniel,
You are an artist. Adopted, and will go in the final published version, if OK with you
Thanks again
-
Yes, of course it´s OK ...
Hope that SketchUp 7 have modelling tools like this ones.Daniel S
-
Im having problems getting it to function at work. It seem to be the same with both the original version and the updated one.
This is what I get in the console:Error; #<TypeError; cannot convert nil into String> C;/Program/Google/Google SketchUp 6/Plugins/LibProtractorTool.rb;131;in `create_cursor' C;/Program/Google/Google SketchUp 6/Plugins/LibProtractorTool.rb;131;in `initialize' C;/Program/Google/Google SketchUp 6/Plugins/nult.rb;500;in `new' C;/Program/Google/Google SketchUp 6/Plugins/nult.rb;500;in `shear_command' C;/Program/Google/Google SketchUp 6/Plugins/nult.rb;523;in `set_command' C;/Program/Google/Google SketchUp 6/Plugins/nult.rb;523;in `call'
-
Looks like it does not find the cursor PNG file (cursorshear.png)
It must be in the Plugins directory
I thought I had put some code to check in any case, but apparently this does not work. -
Thanks now it works. I'd forgot to put the icon in.
Advertisement