This applies well here,
"They professed themselves to be wise, even as they became fools..."
This applies well here,
"They professed themselves to be wise, even as they became fools..."
Popular Mechanics has debunked these insane 9/11 conspiracies. I suggest all you "truthers" read the report and then try to get a life. I can't believe that so many people can be so weak minded.
@thomthom said:
@david. said:
Personally, I don't use 3rd party plugins. If I need something not built-in, then I'll write the plugin myself. IMO, installing 3rd party plugins is a security issue that is ignored by most (as far as I know). I'm not willing to take the chance on that possibility, even though it may be small.
How do you decide on what applications you install on your computer?
I purchase them from reputable companies. Corporate disclaimers aside, I feel reputable companies have a vested interest in making sure the software they sell is safe. And, there is the issue of bugs. No software is perfect, so some bugs will result in security risks. Knowing that, I will take a certain level of risk. I don't download unknown, untrusted applications from someone I don't know and who may live half way around the world. Even then, I always scan everything I install/download. Since Ruby scripts can be scrambled, I can't review them easily prior to running them.
@remus said:
David, i find your position a little strange. You would willingly invest lots of time redoing whats already been done when checkable ruby exists (in 95% of rubies at least.) Compare that to running binary files on your machine: you have practically zero control over what they actually do and no way of finding out (except in the rare case of an open source program, although this would still likely involve intense scrutiny of a lot of code which could take a long time.) Seems like a contradiction to me.
See above. I find it a bit strange that someone would install a script without having a high degree of confidence that it isn't malicious. I'm not saying that most scripts are malicious or the developers are malicious. I'm saying that it is not worth my effort to do that research. I also happen to enjoy writing my own scripts. That is worth my effort. No contradiction at all.
Personally, I don't use 3rd party plugins. If I need something not built-in, then I'll write the plugin myself. IMO, installing 3rd party plugins is a security issue that is ignored by most (as far as I know). I'm not willing to take the chance on that possibility, even though it may be small.
@unknownuser said:
i dunno, when i hear these types of complaints, i basically read them as 'please bloat the hell out of the most widely accessible 3D software available'
just using your lathe.rb example -- i have no need for a lathe tool and i'd rather it not be standard in sketchup.. now do that with the thousand or so other plugins out there and see what a mess you're creating?
just a rough guess is that maybe 10% of all SU users actually have a plugin installed and use it. If i just picked up sketchup and was faced with 100 tools/functions beyond what is currently there, i'd be way turned off and probably seek out another 3d app (which i'd be just as turned off about).
that's the beauty of sketchup -- it's simplicity (and even then, it's still sort of complicated and requires a certain commitment to learn).. it's a great introduction for people into 3D land and can either act as a launching point into other more complicated apps -or- it's current tools can be fully utilized for many full-scale professional jobs.
keeping the plugins separate allows for full on customization of the app once you learn the base SU or realize the need for a certain operation not included in the original install.
i agree with Jim when he says "Let the SketchUp people continue to focus on improving the core, and let the community develop the tools, and provide feedback."
if anything, maybe they can provide more for the writers to work with or some sort of standard checklist/debuggers/installers to help the scripters put out fully functioning cross platform plugins in an easier to obtain method..
but honestly, i don't think SU in general would be at all improved if it came standard with say 'soap skin&bubble'.. i do think it would be greatly improved if higher poly counts were allowed though.
Personally, I have no desire to have 100+ plugins on my toolbar (although, I've seen those that do, and it's quite funny). However, it would be nice to have some of the basic functionality of a few like Fredoscale. IMO, those are truly basic tools, but they're not built in.
Respectfully, comments like yours give the impression that you're not too familiar with what it takes to create some of these 3rd party plugins. While Google SU Ruby API has exposed many parts of the SU architecture, it has not exposed certain parts that would make some these types of plugins much simpler to develop. Then, there is the Webdialog issue. From my experience, Webdialogs are not really a plugin developer's favorite tool in developing a UI for a plugin. Also, when you're depending on 3rd party solutions, you tend to lose consistency in the UI since there is no overall guiding direction.
@unknownuser said:
i agree with Jim when he says "Let the SketchUp people continue to focus on improving the core, and let the community develop the tools, and provide feedback."
By that logic, SU should never add another tool to the SU tool set. That business model doesn't seem very innovative.
The OP has a good point. As a paying customer, I have a right to say that I think Google management has really dropped the ball on SU. It is almost laughable to suggest that Google's SU improvements are in the same league as those made by little ole' individuals writing 3rd party plugins.
In addition to the other comments, I think you're better off creating dimensioned plans by using the standard orthonormal views (three) of each component (or portions of each component). It's more work, but it's more clear to the reader. While I might use dimensions on 3D views for personal use in relatively simple projects, I would not publish a book like that nor would I purchase a book like that.
@thomthom said:
@david. said:
@newone said:
@thomthom said:
Iterate all
model.definitions
- for eachdefinition
iterate through its.instances
array.AND?? This is what TIG's idea does... I want to make difference between definitions that are used in model and definitions that are not used in model. (let's say you make a component, then delete it. It remains in Component Browser, but you don't have it in model anymore).
TIG's script reports me ALL definitions.At the top level, you have to iterate through the model or selection entities, not the definitions. For each compound entity found, you then have to iterate through its child entities. There are 2 different ways of doing that depending on whether a compound entity is a group or component.
Unless you need to know it's parents, or location in the model entity tree, there is no need to parse the whole model. To iterate only used definitions, the definition list is all you need.
If you re-read to OP, that is what I understood that he wants...
@newone said:
Hy, I was playing a little with Entity.parent and model methods and I can't figure out how can I determine the "depth" of an entity. If I have a component (or group) that is encapsulated deep in other component, how can I find how deep (in numbers from 0 to n, where 0 means the component is topmost)
@newone said:
@thomthom said:
Iterate all
model.definitions
- for eachdefinition
iterate through its.instances
array.AND?? This is what TIG's idea does... I want to make difference between definitions that are used in model and definitions that are not used in model. (let's say you make a component, then delete it. It remains in Component Browser, but you don't have it in model anymore).
TIG's script reports me ALL definitions.
At the top level, you have to iterate through the model or selection entities, not the definitions. For each compound entity found, you then have to iterate through its child entities. There are 2 different ways of doing that depending on whether a compound entity is a group or component.
I don't know of a built in way of doing this. For my purposes, I recursively iterate through each top level group and component while maintaining a list of records containing the level spec and other relevant data for each child entity. Classes are perfect for this BTW. I use tests of the form:
entity.instance_of?( Sketchup;;Group ) ...
entity.instance_of?( Sketchup;;ComponentInstance )
It would be nice if the Sketchup Ruby API supported a built in utility to do this.
@newone said:
@jim said:
For a typical plugin that uses a module strictly as a namespace, an instance variable (@anytyhing) can be thought of as "global" within the module.
I think a class variable will have the same visibility when used the same way in a module, but for a different reason.
Before starting this post (and that was the reason for the post), I had some problems with instance/class variables. I noticed that instance variables act something like "globals" inside a module, but something strange happened with class variables. I could not acces class variables from outside class. I am not sure yet what was the cause...
You shouldn't be able to access class variables outside a class (object instance) without using an accessor (a reader and/or writer). Same goes for instances variables. That's part of the reason for using classes. There really are no global variables except true global variables (eg, using '$' as the first character of the name). And, Module vars are not globally scoped, they are Module scope only.
Class vars are visible (or shared) to all object instances of a class. Instance vars are visible only to a specific object instance of a class. That is why I gave the simple example using the truck above. Neither is visible outside an object instance without an accessor (using either a class method or attribute accessor).
You should check out the freely available online doc... Programming Ruby for more details about classes and variables in Ruby.
@msp_greg said:
To all,
I don't know why I looked at this thread, but the basic premise that began it is the idea that an OS object (a file) should have an effect on namespaces in a coding environment. That, at a minimum, is a matter of personal preference.
I could argue that the idea is very foolish, as I want my code to define the namespace, not it's placement in a file, or the file's name.
If we're going to argue about X language vs Y language, might as well address serious topics, not fluff, and somewhere other than a forum about using Ruby in SketchUp.
Greg
Agree 100%! Not sure why JJ keeps pushing this other than OCD.
A very simplified, imperfect, example.
Let's say you have 2 nice, big, powerful Ford F250 pickup trucks. One is bright red. The other is blue.
Class var for all trucks: maxGrossWeight = 3.5 (tons)
Instance var for truck #1: color = red
Instance var for truck #2: color = blue
you're also truly an obsessive personality...
I don't see anything out of the ordinary in that GE image. And, what makes you think that Beale AFB is the home of "Aurora"? A comment like this is a little bit off the wall.