OnShape do math in three-space?

Bill Kahn

Registered
Registered
Joined
Mar 19, 2017
Messages
181
I posted the below in the Drawing forum a few days ago. It got zero responses. I guess folks don't browse there much? Anyway, with apologies, I am reposting in this beginners forum...

I am a complete CAD beginner. The recent Home Shop Machinist article on OnShape got me clicking and five minutes later I was starting to draw shapes on the computer. Nice.

I like how, on the plane, I can specify what I know about a shape and OnShape then fills in what more is needed. For example, you can drop down three points and then specify each of the three connecting lines is 1 inch and it will position the points as an equilateral triangle and tell you the angles are 60 degrees. (And, of course, much more complicated, including telling me when I have over-specified a system).

Now, I want the same capability in three-space. Drop down four points in three-space. Specify all six edges are 1 inch, and I want the computer program to jiggle them around as needed to give me a tetrahedron. BUT, I don't see how to do this.

I can place a unit-length equilateral triangle centered on the origin. Then, on the axis perpendicular to the triangle center, place a fourth point. Then define a plane with point 4 with points 1 and 2 so that I can draw a line from point 4 to point 1. Now, when I try to dimension that new line to 1, I get an error. What I want is for it to slide point four along the plane I defined it on so that the distance becomes 1.

Using other approaches I can make a tetrahedron using OnShape. Not a big deal. But it requires I do some math. I want OnShape to do the math in three-space that it does nicely in two-space.

What am I missing? And, if OnShape does not do three-space math, which of the 50+ CAD programs does?

Thanks for helping me get going here. If this has been discussed before, my apologies, I will happily take a pointer and read the threads.

Cordially,

Bill
 
I'm not 100% clear what you're asking, but.... You can use maths anywhere you specify dimension in Onshape. You can also specify variables at the top of the stack to reference later.

That being said, I'd probably make a tetrahedron simply by extruding an equilateral triangle with a draft angle of - 30°
 
Thank you. Yes, there are a number of ways to make a tetrahedron. But, that is not my actual interest.

In Onshape I can place three points in a plane, connect each with each to form three lines, and dimension each line to be equal to 1 inch. And, Onshape jiggles the points to make it so.

I want to do the same in three-space. Place four points, connect each with each, and dimension each of the six lines to be equal to 1 inch. And have Onshape jiggle as needed to make it so.

Slightly more generally, I want to be able to tell Onshape what I do know about my geometry (ultimately to include angles between coplanar lines, angles between a line and a plane, and angles between planes, as well as distances between points, points and line, points and planes, parallel lines, line and parallel plane, and parallel planes) and have it jiggle to make so (well, if it is geometrically possible). The idea seems to work well in the plane. But I don’t see how to make work in three-space.

Is there some other drawing program which does?

(Sorry for me having a hard time describing what I want. As a beginner I am not really sure of the nomenclature in this world yet)

-Bill
 
I posted the below in the Drawing forum a few days ago. It got zero responses. I guess folks don't browse there much? Anyway, with apologies, I am reposting in this beginners forum...

I am a complete CAD beginner. The recent Home Shop Machinist article on OnShape got me clicking and five minutes later I was starting to draw shapes on the computer. Nice.

I like how, on the plane, I can specify what I know about a shape and OnShape then fills in what more is needed. For example, you can drop down three points and then specify each of the three connecting lines is 1 inch and it will position the points as an equilateral triangle and tell you the angles are 60 degrees. (And, of course, much more complicated, including telling me when I have over-specified a system).

Now, I want the same capability in three-space. Drop down four points in three-space. Specify all six edges are 1 inch, and I want the computer program to jiggle them around as needed to give me a tetrahedron. BUT, I don't see how to do this.

I can place a unit-length equilateral triangle centered on the origin. Then, on the axis perpendicular to the triangle center, place a fourth point. Then define a plane with point 4 with points 1 and 2 so that I can draw a line from point 4 to point 1. Now, when I try to dimension that new line to 1, I get an error. What I want is for it to slide point four along the plane I defined it on so that the distance becomes 1.

Using other approaches I can make a tetrahedron using OnShape. Not a big deal. But it requires I do some math. I want OnShape to do the math in three-space that it does nicely in two-space.

What am I missing? And, if OnShape does not do three-space math, which of the 50+ CAD programs does?

Thanks for helping me get going here. If this has been discussed before, my apologies, I will happily take a pointer and read the threads.

Cordially,

Bill

In SolidWorks, to make a tetrahedron, I would sketch the equilateral triangle and create a plane parallel to the sketch plane and sketch a single point concentric with the triangle. Then I would create a loft between the point and the triangle. However, the length of the sides would be determined by the height of the sketched plane. I can measure the length of the sides and adjust the height of my plane by trial and error and was able to make an unilateral tetrahedron to within 1 ppm accuracy by trial and error.

An alternative to this would be to sketch the equilateral triangle and to create a sketch in a perpendicular plane which passes through the center of the triangle and one of the apex points. Sketch a right triangle with the 90º corner at the center of the base triangle another corner at the apex of the base triangle and with the hypotenuse equal in length to the side of the base triangle. Now create a sketch plane parallel to the first sketch plane and passing through the apex of the second triangle. Next sketch a singular point in the new plane at the apex of the second triangle. Finally, create a loft between the base triangle and the point. The loft will be a mathematically correct equilateral tetrahedron. In SolidWorks, I can use equations to parametrically link the sketch dimensions so to make a change in size, all I have to do is change one dimension, namely the length of the side of the base triangle.


This is of course a special case and I am not aware of any way to parametrically link the features in a generalized manner. It would be case by case effort.
 
To properly define surfaces in 3D space you need more than just a set of points and edges (lines). Each face of the object also has a surface normal that is used to properly draw it (and perform boolean operations on it). Since the surface normal is a vector it has a direction, which establishes which side of the face is inside or outside the object. For canned shapes this is pre-defined, but for user-defined objects it's not so simple. Usually the order in the list of edges for each face establishes the direction, by taking the cross product of the vectors parallel to two edges (they need to share one common vertex as well). This gives you a vector that is parallel to the surface normal. If this vector is adjusted to have a magnitude of 1.0 it IS the surface normal.

So the bottom line is that, mathematically speaking, just giving onshape a list of points and edges isn't enough information to create an object. You may be able to delve deeply enough into onshape's functional guts to do it, but I suspect it would be pretty difficult to create a complex object this way. The object-creating/modifying functions onshape provides hide all these details.

Long back I did some computer graphics programming, even writing a 3D ray tracer that used assembly language to speed up some of the core vector math operations; and also wrote a program that performed 3D boolean operations on objects. So I am familiar with this stuff, but not at all familiar with onshape and its capabilities.
 
Fusion 3D allows 3D sketches and I believe would do what you want.
 
Ah, I see. You need to make sketches in more than one dimension. Project or intersect from the first sketch into the second and set up your constraints for the next set of features.
 
Back
Top