Shape Bender - preview
-
geez chris, this looks great.
i sure hope you can work the bugs out of it
i'm curious if you're testing it with (or even concerned with) sharp bends as well?
[edit] well, i know arcs are basically a bunch of sharp bends so it shouldn't be a problem.. just wondering if the shape needs to be bent to an actual arc (as in - if you check the entity info, SU will know it as an arc)
-
-
Very cool. here's the ICON png. (Copywright issues notwithstanding of course)
-
Totally awesome! I can't wait to get my hands on this! Bending along a path with reversible start and end points is a true advancement for SU. On a side note, excellent video.
@unknownuser said:
:thumb: Very cool. here's the ICON png. (Copywright issues notwithstanding of course)[attachment=0:1dicu6oi]<!-- ia0 -->bender-futurama.png<!-- ia0 -->[/attachment:1dicu6oi]
LMAO! I am such a huge Futurama fan so that icon is just PERFECT on so many levels!
-
Moving... too... fast...
Too... many... improvements... can't... keep... up...
Great stuff. Add my vote for the Futurama Bender Icon
-
WOW go to bed and wake up to a whole bunch of comments, excellent! Thanks for the support, compliments, suggestions, requests and mascots. There are 3 major bugs that I think will fix a lot of crashes.
Problems:When the geometry is longer than the provided line
The bending is not quite accurate. I've got a small error in the calculation somewhere because it actually skews it just a bit. It just wasn't noticeable in the video.
Write in a snippet to deal with the first and last segments of the curve.I think those 3 improvemnts will be enough to get this script ready to put it out to be played with.
Anyhow, enough with the boring details. Thanks for watching the video. I will consider and discuss all suggestions.
@Solo, I like the sweep idea. That would require me learning how regular sweeps work. And while it is similar to this script, I think it is a script of its own. Though it seems like it shouldn't be impossible to write. Its on my list of scripts I wish I had written (along with quite a few others).
@TIG, the script is actually already set to work with groups. I think the only reason I explode it was to get the vertices quickly, but I have since found .flatten! and .uniq! so I can get a clean array of vertices very quickly. So my script works with groups as long as they are not rotated - which I want to fix. I want it to work with a group/component no matter the orientation. I have not sat and thought that through yet, but I'm sure it will take some thinking to do the slicing through a component which has been rotated. It requires transforming all the calaculations, which my brain gets tired just thinking about. So ideally, at some point, the script will accept a group/component with any transformation (including scale too, I forgot about that).
All right, again, thanks for the support!
Chris
-
OH yeah, @Daniel, yes, it should work just fine on a line drawn on a face like in your example. I'm pretty sure that will work. The line and curve selection and reversal portion of the script is pretty stable. I put a lot of time on that while I was sitting around, completely unable to figure out the bending function
-
Wow Chris, very exciting! It's awesome to see this kind of talent! Can't wait for it's release!
-
If you explode a group and then regroup its entities immediately then that new group's orientation is square to the world axes. If it's an instance then explode and group it's entities, ditto ?
Alternatively an instance's transformation could be applied to your cutting plane(s) (face?)...
A transformation includes the scaling ? Exploding it freezes the geometry entities with the previous scaling as if they were drawn in the world originally ??
.
-
@tig said:
If you explode a group and then regroup its entities immediately then that new group's orientation is square to the world axes. If it's an instance then explode and group it's entities, ditto ?
I never tried it because I presumed that it would run into errors if the group was inadvertently touching other objects. I didn't SU to do any auto breaking and joining of edges and faces, thereby messing up my selection set. If the group is laid directly on top of the line it is aligned to, if I explode the group, will that line interfere? I'll play with it and see what kind of results I can expect.
@tig said:
Alternatively an instance's transformation could be applied to your cutting plane(s) (face?)...
Aha! I bet I could figure that out. My intent was to make it so it could occur on any axis, with any group/component. I think that I could transform the plane to be perpendicular the original line's orientation, then line it up and transform it to meet the groups transformation....Sounds do-able.
@tig said:
A transformation includes the scaling ? Exploding it freezes the geometry entities with the previous scaling as if they were drawn in the world originally ??
I think this is where I'll begin, is by trying to explode and re-group to force the component to align to the world axis. It would save me some headaches at this stage, but it would be an improvement over the current condition where the user has to do it manually.
Great ideas TIG, you've been a huge help to me with these scripts,
Chris
-
@unknownuser said:
I never tried it because I presumed that it would run into errors if the group was inadvertently touching other objects. I didn't SU to do any auto breaking and joining of edges and faces, thereby messing up my selection set.
If you group the selection of raw geometry it should be 'orthogonal' to the axes anyway. Or if it's a rotated/scaled group/instance then make a group containing that and then explode it - the new contents of the 'parent' group entities never get 'loose' either ???
-
@tig said:
Or if it's a rotated/scaled group/instance then make a group containing that and then explode it - the new contents of the 'parent' group entities never get 'loose' either ???
Ahh, I think that is a good option.
Right now I'm having a hard time applying a transformation on entities inside a group. Is that known to be problematic? I'm hoping its just one of the bugs in my code.
-
That's an excellent play by play there TIG, thanks for that! That gave some great ideas, and some encouragement to see that these scripts do get fairly convoluted. They just feel simple because like you say, all that happens so quickly.
Chris
-
great work chris...looking forward to it
great description of the process tig...we "average users" really have no idea what's going on inside these scripts. but we love 'em anyway!
-
It IS mind numbing doing that kind of thing...
See my ComponentInstance-add_entities.rb for some ideas on how I work round it.
If you stop-framed it at each stage you'd see that [ignoring the extra bits for making copies etc needed if entities are copied into the definition rather than moved, or the Outliner window glitch fixer...] it...Gets the transformation of the relevant component-instance ['self'].
Makes a group of the given entities.
Gets the transformation of that entities-group.
Makes a group and adds an instance of the component-instance-definition and the entities-group [using the same transformations].
Gets the transformation of that group.
Makes a new group and adds an instance of the component-instance-definition and an instance of the entities-group [we can add a group into a group using group2.entities.add_instance(group1.definition,transformation2)]
Transforms [translates] the copy-group to the ORIGIN using the component-instance's transformation reversed.
Explodes the copy-group and gets the transformations of that temporary-group* and that temporary component-instance.
Makes another new-group at the ORIGIN - then adds an instance of the component-instance-definition placed at the ORIGIN and an instance of the entities-group transformed by the transformation of the temporary-group* and its initial transformation...
It explodes the component-instance and the entities-group within the new group.
It turns that new-group into a new component instance, names it, erases it etc and replaces the definition of the original component-instance with the new component's definition.
If copy-flag set 'true' then it explodes a copy of the entities-group back as they were - otherwise the entities are erased from the model and live on only inside the definition...
If unique-flag NOT set 'true' - it replaces ALL other such instances and removes the earlier [now unused] definition from the model - having given the new definition the old one's name, description etc...
It also erases all of the temporary groups chaff etc...ALL done in the twinkling of an eye...
Phew !!!
BUT it works... -
Chris, very exciting! It's awesome to see this kind of talent! Can't wait for it's release!
thanks!!
-
Gee, I don't know why but since SU7 came out late last year we've seen more development through extensions that it makes me think Google needs to put a net over you lot and drag you all the way to boulder, build you a penthouse and feed you beer and pretzels till the next release....!!!!
I bow to all you guys, you know who you are...
-
@utiler said:
Gee, I don't know why but since SU7 came out late last year we've seen more development through extensions that it makes me think Google needs to put a net over you lot and drag you all the way to boulder, build you a penthouse and feed you beer and pretzels till the next release....!!!!
I bow to all you guys, you know who you are...
i agree to an extent but then again, you gotta remember one of the things that makes sketchup so good.. it's simplicity
if it started being cram packed with features, it would lose that edge and begin looking like all the other stuff out there.i do think google really needs to offer more support for the script writers though. give them what they need so they can really go to town. beer & pretzels too
also, it would be nice if they(google) could find a way to compensate the writers for their time and efforts.another option would be to use some of these newer rubies in the pro version. the original writers could definitely get paid then and there would be a better separation between the pro and free versions while the free version would maintain it's simplicity for new or sporadic users.
-
Exactly what i was thinking Jeff, couldn't agree more!!!
I believe the future Pro version should incorporate scripts from Whaat, Fredo6, Chris, TIG..... I'm going to stope there out of respect for not naming someone!!SU Pro should be different and how better to do so than by rewardint those who spend countless hours on these scripts for mostly a pat on their back from their peers...
I think the lest thing to come out of such a "pro' version would be that through a collaborative effort, the wonderfully simple UI of SketchUp would be maintained.... -
Maybe you must also consider than some coders write Plugs only for their pleasure?
Advertisement