Wednesday, November 29, 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 desirous about taking a look at how the arc software works and want to make one thing related as an extension, however with my very own customizations that go well with my wants. I’m utilizing SU23.

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

Fascinating. Are you aware the language they’re coded in and if I can move that info via externally, type 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. It’s best to examine on that. There are already extensions that may draw numerous kinds of arcs. They’re coded in Ruby. As a substitute of reinventing the wheel why don’t you have a look at them. Possibly they already do what you want.

Properly, there are points with that for my use case. I need excessive precision, and a number of 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 a number of the final values are a bit totally different.

For instance, shall we say I wish 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 after I take that worth, and assign it to the suitable begin and finish angles, it produces a virtually good worth.

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

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

What’s fascinating is after I throw in a large 200 digit calculation and simply skip all the mathematics within the editor it offers me the identical end result because the arc software does. I do know this sounds silly as a result of I’m nitpicking over a ridiculously small decimal worth however I simply wish to make the very best software attainable.

What sort of work requires that stage of precision in sketchup? If it’s for one thing associated with quantum physics I’m positive you’re not utilizing the proper software program.

Or the correct of pc. All digital units have a restrict to the precision of numbers they’ll deal with. For present industrial computer systems it’s 64 bits. I perceive the sensible restrict is decrease in most software program (as an illustration, I appear to do not forget that AutoCad numbers are 32-bit).

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments