Friday, December 1, 2023
Home3D ModelingFile path for SketchUp instruments - Professional

File path for SketchUp instruments – Professional


Can anybody direct me to the Ruby code for the default SketchUp instruments? I’m curious about taking a look at how the arc device works and wish to make one thing related as an extension, however with my very own customizations that swimsuit my wants. I’m utilizing SU23.

I don’t consider the native instruments are coded with Ruby.

Attention-grabbing. Are you aware the language they’re coded in and if I can move that data via externally, sort of like an extension.

I don’t know the language they’re coded in however I count on re-engineering the code can be a violation of the EULA. You need to verify on that. There are already extensions that may draw varied kinds of arcs. They’re coded in Ruby. As a substitute of reinventing the wheel why don’t you take a look at them. Perhaps they already do what you want.

Effectively, there are points with that for my use case. I need excessive precision, and among the arc creation instruments don’t all the time provide it. Once I go to code my very own, I get some actually good precision, however I discover that among the final values are a bit totally different.

For instance, let’s imagine I need to discover the arc size of an arc of radius 30 and a central angle of 45 levels. Mathematically, that’s quite simple (Math::PI/4)*30.

However once I take that worth, and assign it to the suitable begin and finish angles, it produces an almost excellent worth.

____Actual: 23.561944901923449288469825…
_Extension: 23.561944901923447
SU Arc device: 23.56194490192345

Edit: (added these underscores to get it to align for higher visibility.)

What’s fascinating is once I throw in a large 200 digit calculation and simply skip all the maths within the editor it provides me the identical outcome because the arc device does. I do know this sounds silly as a result of I’m nitpicking over a ridiculously small decimal worth however I simply need to make the very best device potential.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments