Dan, right on the money. I have been programming for 53 years but I am new to Ruby. I have done JS/CSS work but not a lot. Assembler is my game and that is where I am very comfortable.
Posts
-
RE: SKUI β A GUI Framework for SketchUp
-
RE: SKUI β A GUI Framework for SketchUp
Thanks for the info TT. I will start a thread on the 2017 problem. I think it is related to how the various windows are now constructed, especially the materials window. I have a feeling it isn't being really closed when it is hidden. It very much slows down anything to do with materials when it is open. I will bring it up later but right now I am super busy and have an appointment with the professor on Friday so I have work to do before then. I will have a look at SKUI now and see if I can make it do what I need. If necessary I will add whatever code I need in JS or just write my own. I was just looking to save some time.
Now I need to figure out what the heck is going on with Win 10. I may just be forced to downgrade to Win 7 for now since it works just fine. I need something I can take to meetings to show what is happening in this project. Eventually I need to handle 64 colours for 64 channel EEG.
-
RE: SKUI β A GUI Framework for SketchUp
The UI doesn't need to be fancy but I need some decent colour controls using sliders or similar. What I am doing has nothing to do with being an actual CAD plugin but Sketchup is perfect for what I need in many ways, especially the compatibility issues. Since I am an engineer I am already very familiar with Sketchup and that cuts off a lot of time in making what the lab needs. Pretty much everything else in the controls can be nicely handled with a toolbar but not the colour controls. I already have the color system able to switch 20 colors (materials) at over 12,000 times per second so that part is good. I have been playing with computers for just over half a century. Ruby is very interesting, nothing like assembler which is what I am used to. If you can think of a way to make a nice slider control without an HTML interface that would be appreciated.
This reminds me, there is something haywire with version 2017. The code I am using to switch materials runs about 10 time slower in 2017 and there doesn't seem to be any way to speed it up compared to Make 2015. There is another issue too. Getting rather off topic but on Win 10 on my MSI gamer laptop ruby refuses to do more than 16 color changes in the same method. That is with everything else exactly the same, same version of Make 2015 and identical code but when I try to change more than 16 materials in a row Ruby crashes.
I should also mention that at this point in time I am not free to show what I am working on. There are confidentiality issues having to do with medical investigations. Some of it I can describe but I will need to speak with the professor about how far I may go.
-
RE: SKUI β A GUI Framework for SketchUp
Where does this stand at this point in time? I am doing a major project for the local neurology lab disguised as a Sketchup plugin. That way it will be easy to run on Windows and Mac and the project needs a 3D presentation. The University is all Mac but I have been a Windows guy since and before it was invented. I am at the point where the toolbar I created is just not good enough and need something better. I have done plenty of JS and related but if I can keep it all in Ruby I will be a lot happier.
This looks like just what I need. Anything I should watch out for to make it Mac compatible? In particular what will happen with Safari? Any clue?
BTW, TT, you have been a lot of help for me in the past. I have been using Sketchup since it was invented. It is by far my favorite CAD program and your plugins are excellent.
-
RE: Steampunk Raygun
I love steam punk and that is excellent. As for the parts you aren't happy with I have a couple of observations.
When making an insert to be covered with velvet or felt it is cut from a soft wood such as basswood with a scroll saw. The curves that surround the bilinear intensifier rings on the barrel would be much too difficult to cover with the fabric so the well would be cut straight. The velvet needs a little more texture and the colour is a bit too saturated. Velvet reflects quite a bit of specular light and that washes out the colour.
I took the liberty of making those changes in Paint Shop Pro v7 to show how it would look. I left the lid unchanged for comparison.
-
Is it possible to set global gravity to take effect in sim?
I can set the global gravity via script at any time but it doesn't take effect until the next simulation run. It shows up as a changed setting in the plugin global parameters setting screen but it has no effect within the simulation when it is running. Any ideas?
The script used to change global gravity is:
Sketchup.active_model.set_attribute( "SPSETTINGS", "gravity", "1.0")
-
RE: The SketchPhysics Railgun/Coilgun
I have upgraded the model significantly including a sound effect, just for fun.
-
RE: Using Sketchup to design an actual product
@slimdog said:
Its great to see a project that can be done by one man from start to finish.
Looking forward to some pixs of construction.
Cheers
S
That is a pretty trivial example although without CNC capability it would be very difficult to do on manual equipment. I have far larger projects that have been designed in SketchUp that are either complete or under construction. In particular I have designed a ten inch aperture telescope that is nearly finished. The entire design is done in Sketchup including many CNC machined parts. I will post more on that in another thread in the near future but right now it is nearly impossible to post anything here. Page load times in the last two days are in the range of 10 to 15 minutes. Something is haywire in the network somewhere as my internet connection isn't that slow.
-
Using Sketchup to design an actual product
I have a Canon TX1 camera that I really like and use it in my machine shop to take videos. It is a very small camera and a machine shop is an unfriendly environment. I also have grip and fumble problems so I designed a cage that both protects the camera and enhances the handling security. I have CNC equipment I designed and built which makes it possible to design something in SU, export it as a DXF to the CAD/CAM program and then use that design to make the actual parts. This is a simple example of that process.
The design concept in plan view.
The 3D visualization and the actual product:
-
The SketchPhysics Railgun/Coilgun
I have been trying to post this since yesterday but server response has been so slow that it times out every time until now.
This model uses the positive/negative property of the magnetic property in SP 3.2 to greatly accelerate a projectile to a target. All the "coils" are active and the precise values for all the global and individual variables are critical as is the exact placement of the projectile. The model is extremely sensitive to initial conditions.
The sensitivity to initial conditions is because this model takes advantage of a quirk in the programming to achieve the acceleration. When the magnetic object passes through a pair of coils if the timing is precisely right it will get a boost because of the granularity of the velocity calculations. If the attracting force gives the object velocity v at distance d before the crossover point the object will then be placed by the math in the repulsive zone on the next frame. Because of the exponential algorithm used to determine the fall off of the forces if that new position happens to be very close to the repelling coil the succeeding calculation will give the object a new much higher velocity. When the next frame is calculated the distance traveled will be so large that the new higher velocity will place the object far away from the attracting coil so that the forces do not balance. This granularity is a weakness of all numerical methods that are used to calculate motion.
-
Stable magnetic levitation in SP 3.2, model included
Stable levitation of static permanent magnets using only such magnets is prohibited by the laws of physics as proven by Earnshaw's Theorem. Note that diamagnetic materials and superconductors are not permanent magnets. In SketchyPhysics 3.2 magnets may be made repulsive by assigning a negative magnetic value to the magnet property. These magnets are however unipolar, whereas real magnets are always bipolar. Because of this simplification that makes it possible to calculate in real time it is also possible to make a stable levitating array.
This opens some interesting possibilities such as a model of a maglev train as well as a propulsion method for projectiles. An easy model of a air hockey table is also a possibility. Hovercraft and other antigravity devices can also be modeled.
http://sketchup.google.com/3dwarehouse/details?mid=277f0f6a2929b1f0e845c056d1647575&ct=mdsa
-
Chain that works with no joints
This is chain that works in SP 3.2 or higher. It gets around the problem of all collison surfaces needing to be convex by making the links from smaller components that are each entirely convex and set as a group to collide. Then each link is grouped to keep the smaller parts together. It isn't very strong but it illustrates how to work around the convexity problem. Surfaces that are concave at any point cannot be made to collide since the required math is too complex to do in real time.
The chain can be made prettier with a little more work but it will increase the polygon count. That can be kept under control by making the links components instead of groups. The chain may be made longer by copying a section and pasting it in place. The copy will inherit the properties and since there are no joints that will work fine. Edit: If it runs too slow on your 'puter then delete some of the chains and turn off shadows. Also, you can use this to create a realistic draped, hung, drooping, pile, bucket of chain. Set it up in SP and do whatever you want with the chain. Then on the Edit menu "Select all" and "Copy". That will copy the current state of the simulation which can then be pasted after the simulation is stopped. The resulting model may then be used in a static model.
http://sketchup.google.com/3dwarehouse/details?mid=187229808f4f1108e845c056d1647575&ct=mdsa
-
Polished Brass 30 inch Air Horn, custom mesh
I use a short script I wrote as a plug-in for the CamBam CAD/CAM CNC program to generate custom meshes that are either difficult or impossible to make within SketchUp. This is an example of a 5th power inverse parabolic curve used to generate the horn. CamBam exports to DXF which may be imported by SketchUp either via a plugin or as a native feature of SU Pro. CamBam is available in a trial version that doesn't expire and has all features enabled. The only limitation is on the number of lines of G-Code it will generate. This has no effect at all on the ability to render complex curves as may be generated by my script. If someone wants to port it to Ruby it would make a nice plugin for SketchUp. I am not up to speed with Ruby as yet but when I have time it will be on my list of things to do.
My CamBam plug-in source code/script is here: http://ixian.ca/server/polygonemesh_V5.vbs
The horn:
Rendered in PovRay 3.6 with hand tweaking.
Link to the horn skp:
This is an example of the sort of complex meshes that may be generated as well as open spirals, helices, regular polygons both 2D and 3D and a wide assortment of solids from prisms to just plain weird things.
Here is a just plain weird thing:
-
RE: Testing /Largeaddressaware property in SU 8
Increasing the amount of application memory at the expense of system memory isn't likely to address memory problems in Windows XP 32 bit. It isn't the general application paged pool memory that runs out in most cases. Applications that have a Graphical User Interface must allocate GDI OBJECTS and USER OBJECTS (GDI=Graphics Device Interface). There are limits on the number of such objects that may be created by any single process and there is also an overall per session limit. Per session means a session desktop for a logged on user.
SketchUp makes heavy use of such objects. Other applications such as Windows Explorer and Internet Explorer are also very heavy users. When the maximum limit for User Object or GDI Objects is approached the system will begin to degrade. It doesn't usually crash but certain functions such as the clipboard and right-click context menus will stop working.
You can see here how many objects are being allocated by various processes:
The only way to recover the ram used by these objects is to close the apps that are using the space available. Internet explorer is particularly bad in this respect. Firefox isn't any better. The best browser that I have tested is Opera. It uses far fewer objects when multiple tabs are open.
Existing allocated GDI and USER objects will not be deallocated until all instances of an application are closed. The situation becomes even worse if Terminal Services is running. Then the GDI ram is allocated from the unpaged system pool instead of the general application paged pool and the number of allowable objects drops dramatically. In fact, if Terminal Services is running then using the Large Address switch on XP will make the situation much worse.
Bottom line: There is no benefit to using the Large address switch on Windows XP 32 bit and that probably includes the 64 bit version although I am not certain of that.
References:
Process explorer is a part of the Sysinternals Suite available here:
http://technet.microsoft.com/en-us/sysinternals/bb842062 -
Three Body Orbital Mechanics Sim
This is for SketchyPhysics 3.2 on Sketchup 7 only. It demonstrates some of the complexity of the three body orbital mechanics problem. There is no usable general case analytical solution to the three body orbital mechanics problem and after you play with this you will understand why. The model is extremely sensitive to initial conditions. Collisions are treated as perfectly elastic but if they occur under the right circumstances the simulation math "blows up". This is always a limitation with any numerical approach to modeling this type of problem. Try moving the "planet's" starting position to change the simulation parameters. If you save it, save it to a different name as you will never recover the same initial conditions.
Note also that the image shown for this simulation is not correct due to a limitation of the watermark properties.
This simulation always causes SketchUp 8 to crash. My best guess is that it is either a stack overflow or a value is exceeding a variable container limit. The crash will happen sooner or later but WILL happen. No problems at all on SU7.
Edit to add image:
Edit to change linkhttp://sketchup.google.com/3dwarehouse/details?mid=cd576ace20352dd94322578eaa9892aa&ct=mdsa
-
Source code humor
In the module ControllerCommands.rb at line 1151 there is a comment about the variable scope that should be used with the body properties.
@unknownuser said:
#Needs to be private. do not use public. unexpected results.
def touchable=(flag)
@touchable=flag
etc.... -
RE: SketchyPhysics 3.2 Need bug reports!
Create sphere 10 units diameter. Set to static, sphere, magnetic. Set magnet property to 999. Set script lineardamping=0, angulardamping=0. Create second sphere 500 units distant the same but no autofreeze, no static, magnetic, set magnetic property to 999. Set global gravity to zero.
Start sim. It will crash much sooner than later, presumably from a stack overflow or illegal value for the container variable(s). Also, there is still significant damping. How can that be eliminated? Also, the noautofreeze doesn't work. Once beyond a certain distance the mobile sphere must be nudged to start moving. That is probably a result of the non zero damping or possibly integer math with a non zero value to prevent divide by zero errors. (WAG)
-
RE: Intro and a few examples
Hmm. The Chinese have a saying "May you live in interesting times". In that particular use the word interesting is near to being a curse.
Here are a couple of more renders of a planetary transmission. This is for possible use in an electric trike project that I have built and am experimenting with. The trike is intended to be a hybrid utilizing electric and petrol power as a true hybrid where the petrol engine operates as an assist to the electric system. Note that I am not in business not do I have any plans to start one. Any developments such as this are free for anyone to use if they think it worthwhile.
This is the concept drawing of the trike:
This is the actual development vehicle:
-
RE: Intro and a few examples
Ok, now I know what you mean. That issue goes far beyond just creating faces. It is directly tied to how the inference engine works to autosnap lines together so the geometry isn't left open. If it didn't do that there would be major problems with users that freehand draw instead of using the measurements window to specifiy precise node locations. It would be nice if the autosnap function was adjustable to less than .001" but there are some workarounds that can be used.
-
RE: Intro and a few examples
No, that would really be cheating and hard to do anyway. The "threads" aren't threads at all since they aren't helical. I only modeled 1/5 of the part and then copied it to make the full model.
So what is the "faces" problem?