Skip to content

Triangle Calculator Function for OpenSCAD

Advertising
Advertising
?
Creation quality: 5.0/5 (1 vote)
Evaluation of members on the printability, utility, level of detail, etc.

  • 1.4k views
  • 17 downloads

License
3D design format
SCAD and STL Folder details Close
  • Demo_Angle_Bracket.scad
  • Demo_Robot_Arm.scad
  • Demo_Rounded_Triangle.scad
  • Triangle.stl
  • Triangle_Calculator_Function_03.scad

Learn more about the formats

Publication date 2022-05-18 at 23:02
?
Published to Thingiverse on: 2022-05-18 at 01:34
Design number 729307

3D printer file info

3D model description

Triangle Calculator

The “trical” function is heavily based on the module triangle_solver by lar3ry, https://www.thingiverse.com/thing:4859001

WHAT DOSE IT DO?
The trical() function takes three known pieces of information about a triangle and uses them to calculate the remaining sides and angles.
The function returns a vector containing six numbers, these are the three internal angles and the lengths of the three sides.

[angle_A, angle_B, angle_C, side_a, side_b, side_c]

This function makes it quick and easy to perform trigonometry calculations. The returned data can be used for things such as position, rotating and scaling of the component parts of whatever you're designing.

HOW TO USE IT:
Input three known pieces of information about the triangle, at least one of which must be a side.
Input values don't have to be labelled, but if they're not, you must put them in order, with the unknown values input as "0" or "undef".
trical(C=90, a=3, b=4); valid input
trical(0, 0, 90, 3, 4, 0); valid input

ADDITIONAL TOOLS:
The trical .scad file also contains two additional tools
tripoints()
This is a function that takes the returned vector from trical() and calculates the [x,y] position of the corners relative to each other, and returns them in this form [A=[x,y], B=[x,y], C=[x,y],]
tribuild()
This is a module that takes the returned vector from trical() and uses it to create a 2D triangle.

ADDITIONAL INFORMATION:
The expiation above is just is the abridged version. The full text can be found inside scad file itself.

DEMONSTRATIONS:
In addition to the .scad file for the trical() function itself, I have included a few interactive example files that demonstrate the sort of stuff you can use the trical() function for. For ease of use open the Customizer window .

3D printing settings

-

Advertising


Issue with this design? Report a problem.

Would you like to support Cults?

You like Cults and you want to help us continue the adventure independently? Please note that we are a small team of 3 people, therefore it is very simple to support us to maintain the activity and create future developments. Here are 4 solutions accessible to all:

  • ADVERTISING: Disable your banner blocker (AdBlock, …) and click on our banner ads.

  • AFFILIATION: Make your purchases online by clicking on our affiliate links here Amazon.

  • DONATE: If you want, you can make a donation via Ko-Fi 💜.

  • WORD OF MOUTH: Invite your friends to come, discover the platform and the magnificent 3D files shared by the community!


Sharing and downloading on Cults3D guarantees that designs remain in makers community hands! And not in the hands of the 3D printing or software giants who own the competing platforms and exploit the designs for their own commercial interests.

Cults3D is an independent, self-financed site that is not accountable to any investor or brand. Almost all of the site's revenues are paid back to the platform's makers. The content published on the site serves only the interests of its authors and not those of 3D printer brands who also wish to control the 3D modeling market.

100% secure payment by credit card, PayPal, Apple Pay, Google Pay, etc.
View all payment options.