Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Answers
Here is how simple it can be
Drawing a pretty picture that looks vaguely right is easy. If that's all I wanted, I'd just knock up some code:
#! perl -slw no warnings 'pack'; use strict; ## CUFP "Graphic screwing" use Data::Dump qw[ pp ]; use GD; use constant FNAME => 'CGScrew'; use constant { COS30 => 0.86602540378443864676372317075294, TAN30 => 0.57735026918962576450914878050196, DEG2RAD => 0.017453292519943295769236907684886, RAD2DEG => 57.295779513082320876798154814105, }; use enum qw[ X Y Z A ]; sub rgb2n{ unpack 'N', pack 'CCCC', 0, @_ } chomp( my @golds = map split( ' ', $_ ), <DATA> ); ## Construct thread profile segment sub constructThreadProfile { my @points; my( $dia, $pitch, $yInc ) = @_; my $H = $pitch * COS30; # draw flat crest my $x = $dia / 2; my $y = -$yInc; push @points, [ $x, $y += $yInc, 0, 1 ] while $y < ( $pitch / 16 ); ## draw upper 30deg flank. my $xd = $yInc / TAN30; my $yLim = $y + 5 / 16 * $pitch; push @points, [ $x -= $xd, $y += $yInc, 0, 0.5 ] while $y < $yLim; ## draw root radius $yLim = $y + $pitch / 4; ## cx = $dia /2 - 7/8*$H +$H/3 my( $cx, $cy, $r ) = ( ( $dia/2 - 7/8*$H + $H/3 ), $pitch / 2, $H / 6 ); while( $y < $yLim ) { my $dy = $cy - $y; my $dx = sqrt( $r**2 - $dy**2 ); push @points, [ $cx - $dx, $cy - $dy, 0, $dx / $r ]; $y += $yInc; } $y -= $yInc; ## draw lower 30deg flank $yLim = $y + 5 / 16 * $pitch; push @points, [ $x += $xd, $y += $yInc, 0, - 0.5 ] while $y < $yLim; push @points, [ $x, $y += $yInc, 0, 1 ] while $y < $pitch; return \@points; } our $M //= 10; our $P //= 1.5; our $L //= 2; our $S //= 100; our $G //= 0; our $R //= 0; our $Q //= 2; our $A //= 10; our $D //= 0; my $fname = sprintf "%sM%.2fxP%.2fxL%.2fxS%d.png", FNAME, $M, $P, $L, $S; my $profile = constructThreadProfile( $M, $P, 1 / ( $Q * $S ) ); #pp $profile; my( $w, $h ) = ( $M * $S + 200, int( $L / $P + 1 ) * $P * $S + 200 ); my $xc = $w / 2; my $im = GD::Image->new( $w, $h, 1 ); #$im->fill( 0,0, rgb2n( 0,0,0 ) ); my $step = int( $h / 256 ) + 1; my $y = $h; for my $x ( 0 .. 255 ) { $im->line( 0, $y, $w, $y--, rgb2n( ( $x ) x 3 ) ) for 0 .. $step; } sub xformPoint { my( $point, $rot, $yTrans ) = @_; $rot *= DEG2RAD; my $x = $point->[X] * cos( $rot ); my $y = $point->[Y] + $yTrans; my $z = $point->[X] * sin( $rot ); my $a = $point->[A] * cos( 90 * DEG2RAD - $rot ); return [ $x, $y, $z, $a ]; } my $yTrans = $P / 360; my $maxRad = $M * $S / 2; my $yOff = 100; for my $turn ( 1 .. $L / $P ) { for my $p ( map $_/$A, reverse 1 .. $maxRad*$A ) { for my $p2 ( $p ) { my $rot = RAD2DEG * atan2( sqrt( $maxRad**2 - $p2**2 ), $p2 ); for my $point ( @$profile ) { my $newPoint = xformPoint( $point, $rot, $yTrans * $rot ); $D >=9 and print "rot:$rot old:[ @$point ] new:[ @$newPoint ]"; my( $newX, $newY ) = ( $xc + $newPoint->[X] * $S, $yOff + $newPoint->[Y] * $S ); my $color = abs( $newPoint->[A] ) * 256; $R and $color = ( $color + $newY%($P*$S*5) ) % 256; $color = $G ? $golds[ $color ] : rgb2n( ( $color ) x 3 ); $im->setPixel( $newX, $newY, $color ); } } if( $D >=5 ) { open O, '>:raw', $fname or die $!; print O $im->png; close O; system $fname; } } $yOff += $P * $S; } $im->string( gdSmallFont, 0,0, $fname, rgb2n( 255, 255, 255 ) ); open O, '>:raw', $fname or die $!; print O $im->png; close O; system $fname; __END__ 0 2883584 2883584 2883584 2883584 2883584 2883584 2949376 2949376 2949376 2949376 3015168 3015168 3015168 3080960 3146752 3146752 3146752 3212544 3212544 3278336 3278336 3344128 3344128 3409920 3409920 3475712 3475712 3541504 3607296 3607296 3673088 3738880 3738880 3804672 3804672 3870464 3936256 4002048 4002048 4067840 4067840 4133632 4199424 4265216 4265216 4331008 4396800 4462592 4528384 4528384 4594176 4659968 4725760 4791552 4857344 4923136 4923136 4988928 5054720 5120512 5186304 5252096 5317888 5383680 5383680 5449472 5515264 5581056 5712640 5778432 5844224 5910016 5910016 5975808 6041600 6107392 6173184 6238976 6370560 6436352 6502145 6567938 6633731 6699524 6765317 6831110 6896903 6962696 7028489 7094282 7160075 7291661 7357454 7423247 7489040 7554833 7686419 7752212 7818005 7883798 7949591 8081177 8146970 8212763 8278556 8410142 8475935 8541728 8607521 8673314 8804900 8870693 8936486 9002279 9133865 9199658 9265451 9397037 9462830 9528623 9594416 9726002 9791795 9857588 9989174 10054967 10120760 10252346 10318139 10449725 10515518 10647104 10778690 10844483 10910276 11041862 11107655 11173448 11239241 11370827 11436620 11502413 11633999 11699792 11831378 11897171 12028757 12094550 12160343 12226136 12291929 12423515 12489308 12555101 12620894 12818273 12884066 12949859 13015652 13081445 13213031 13278824 13344617 13410410 13541996 13673582 13739375 13805168 13870961 13936754 14002547 14134133 14265719 14331512 14397305 14463098 14528891 14594684 14726270 14857856 14923649 14989442 15055235 15121028 15186821 15252614 15318407 15384200 15581579 15647372 15713165 15778958 15844751 15910544 16042130 16107923 16173716 16239509 16305302 16371095 16436888 16502681 16634267 16700060 16765853 16766110 16766367 16766624 16766881 16767395 16767652 16767909 16768166 16768423 16768680 16769194 16769194 16769451 16769708 16769965 16770222 16770479 16770736 16771250 16771250 16771507 16771764 16772021 16772278 16772535 16772535 16773049 16773306 16773563 16773563 16773820 16774077 16774334 16774334 16774848 16775105 16775105 16775362 16775619 16775619 16775876 16776133 16776133 16776647 16776647 16776904 16776904 16777161 16777161 16777161 16777161
to generate one:
<img alt="" src="https://image.ibb.co/hjMyrT/CGScrew_M10_00x_P1_00x_L5_00x_S200.png">
(Or, just take a picture.)
But drawing an accurately proportioned, positioned and toleranced thread so that it can subsequently be analysed with FEA for stress and strain, and produce realistic results accurate enough to base material specification upon; requires some attention to the details.
I have a suggestion, if you're truly looking to learn the OS interface, is tackle one simple challenge at a time and post a separate thread re: same. That might get you a little closer a little slower but the knowledge will be something you might actually be able to use for the future.
So yes, it really is that simple, we know because we do it every day.
Owen S.
HWM-Water Ltd
The drawing isn't posted as an example of something I want OS to do for me; it is the engineering specification for a standardised https://en.wikipedia.org/wiki/Metric_thread.
In contrast to your randomly sized equilateral triangle, with one corner knock off at some random depth with some random radius, and positioned at the wrong place relative to the nominal diameter of the shaft.
Not looking for, encountering. And documenting here to my own embarrassment.
Hm. Yet you appear to not be capable of reading a specification.
You can add all that extra detail into into your sketch in a couple of minutes.
Better still use configurations to build any size bolt you like automatically from a drop down list.
Better still use featurescript to write a feature that will build it for you.
Also let me add a final comment. Some of us have been here for years, some are new. All are respectful and helpful to each other. It's a great place to be. Never in all the time I've been posting here have I seen anything approaching this level of single minded arrogance.
Let me summarise:-
me_here:- Waah, Onshape is hard and can't do "a".
Forum users (polite help):- Sorry you're having trouble here are 3 examples of how to do "a", have a nice day.
me_here:- Waah, yeah but it can't do "b".
Forum users (bending over backwards):- OK you didn't ask for "b" but here are some videos of how to do it in approximately 20 seconds.
me_here:- Waah, why are you so stupid that you answered the question I asked rather than determining that I wanted to build a thread to the standard?
Forum users:- Erm OK, you can build it to the standard, just add in the extra parameters then...
me_here:- Waah, insult, insult.
You've certainly made an impression:-
Bearing this in mind i have no interest in communication with you in the future.
Owen Sparks.
HWM-Water Ltd
1) draw a proper thread.
2) position anything accurately in this ... system.
I don't need you to do it for me -- I have this trivial task already done in each of 5 other environments:
I've even (eventually) done it here (properly)
https://cad.onshape.com/documents/d3b0970eb84d93e90b26fdf5/w/5d8749fed6862d079f36077a/e/1502a4e66f2357fa7948d3cf
But damn was it ever a faff, frought with weirdness and duplicated effort.
I needed to know
a) if it was possible here;
Probably, but the knowledge of how seems thin on the ground.
b) if so how.
I'm amazed after this long thread nobody has stepped up to demonstrate how.
c) and how many times more effort it is to do so than in those other environments.
From I have seen, between 3 and 6 times as much effort. (If you ignore the flakyness which they'll probably fix in time.)
I don't need to be liked by a bunch of strangers; I needed to know if this product had a knowledgable and helpful community, and you've given me my answer. Nor I you. You been patronising me from your first reply, and get offended when I call you out.
Bye
I do not understand? Your accurate iso metric thread sketch looks like this:
Is this joking?
For you, there is one feature in OnShape you will find very useful:
You can find it in "Manage account"
me_here910 said: Very well said - ciao
Further proof that despite your self proclaimed expertise, you do not know how to read a specification.
Further hint (from: https://en.wikipedia.org/wiki/Metric_thread) Note: "can", "may" not must; and no definitive specification for exactly how.the root should be radiused. There are recommendation and formulae for calculating the minimum root radius:,Rmin (from http://www.amesweb.info/Screws/IsoMetricScrewThread.aspx )
But note also that Rmin is shown in 2 (and by implication of symmetry, 3) different places.
Using a conic section, a variety of different compliant radii can be approximated -- within an acceptable few percentage points -- by varying a single parameter.
Which facilitates this type(pdf) of simulation testing relatively painlessly.
(Weak the force is, with this one.)
But you know what ... I'm still not ready to give up on OnShape; it's obviously very powerful, just hampered by
1) An iffy UI.
That could be fixed, but it will only happen if the problems can be openly discussed and addressed.
2) A poor help system that seems to be based on the 'Never mind the quality feel the width' philosophy.
Less is more when it comes to documentation; and segregating marketing hype from help & support. goes a long way to producing a concise and accurate learning path for new users; and reference for those who've forgotten the details.
3) .A user community that doesn't take critical evaluation as a personal affront; and resort to 'It's my ball...', when their slipshod advice is questioned.
Which is a crying shame; because the single greatest asset a software product can have, is a strong, open user community that recognises the flaws as well as the good stuff in the product. That's how good products become great ones.
For anyone reading along who may be new to Onshape and may be evaluating whether it's a helpful constructive company let me offer this up:-
(1) OS has a thriving customer driven Improvement Request facility. (Click Here)
(2) The most helpful and responsive staff I've seen in any software company, period. (Click here for example)
(3) The highest development cycle you could ever ask for. (Clicky)
(4) A forum packed full of Onshape staff, Professional Engineers, Makers, Hobbyists you name it, all of whom have shown over and over again that they're ready to help anyone who has a question.
(5) In my opinion some of the most clean consistent and intuitive interfaces I've used. That's not to say they can't be improved. OS are always developing and happy to engage in feedback discussion.
(6) Clear help documentation (Link)
(7) Excellent free webinars (Link)
So if you're new here please don't be put off by this one thread. This is very much a one off.
Cheers,
Owen S.
HWM-Water Ltd
My original surprise was not the conic, it was that your sketches had no dimensions. This is bad.
Actually not. In the original standard (1957 I think) for M threads, the standard only specified the upper maximum of the minor diameters (root diameters) of internal and external threads; and it was noted that "they may/can be radiused". It wasn't until the 1998 revision that a minimum root radius was specified, but even that doesn't fix the root as round.
Within the margins between the upper and lower tolerances, the shape is unspecified, so a variety of root profiles -- from from flat with radiused corners to oval to fully round -- are possible.
The green tolerance area and multiple Rmin radii in this diagram make it clear(er).
Excuses: 1) It's a junk project for trying things out; 2) I'm (as is obvious) still getting to grips with the interface here.
In general, I prefer to not clutter my models with dimensioning; I leave that to the drawings.
I try to make part to spec with all dimensions (please do not shout at me if it is not right):
https://cad.onshape.com/documents/49b0cc0ff82043616eca66b7/w/a70a620c8ab51c33fd83bc9c/e/61b80dc6b4346cf0c9066a8a
Sketches must be "solved" by using dimensions and constraints. When all is black, sketch has only one solution. If you edit #D (diameter) and #P (pitch) thread should be correct for all possible sizes. This is why people use OnShape not AutoCad.
I hope this helps you.
Sorry, I used a full round.
No worries. Thank you for persisting. This is where OS is leaving me cold at the moment. It seems to want/need me to "dimension" and constrain, lines and curves that it already know the values for; or should be able to infer.
As an example of what I mean, I drew the following sketch (in https://cad.onshape.com/documents/b9ca189e0002150fd843637c/w/536b13d81de845ba4f65b8d9/e/d38cd9120d6a9eb1a0d7de10)
Two concentric circles (14mm & 35mm) centred at the origin; and a centre point rectangle 10mm x 16mm also centred about the origin. I then trimmed away the bits I don't want.
As far as I'm concerned -- and other software I have concurs -- that sketch is entirely defined; yet OS marks the two verticals in blue indicating (I assume) that it doesn't think that they are yet fully defined.
The worst part is that I cannot find (or perhaps; do not recognise?) anything that tells me why it isn't happy; or what it wants me to do to satisfy it.
To the best of my memory, I haven't "shouted" at anyone. It was never about constructing the exact geometry for a thread profile.
The only complaint I made, is that examples of "how easy it is in OS"; only make it look easy because they were ignoring 90% of the requirements.
Looking at your sketch2 I see this:
The point I've labelled "A", defines the relative position of the sketch to the shaft, in the horizontal axis, but I do not see anything that defines its vertical relationship to the shaft/helix?
I can see that sketch2 is named as the face to sweep in Sweep2, but I'm baffled by how the relative position is defined or constrained to the helix?
Also, what do you do if you want to reuse that same profile on a shaft that is oriented in a different axis?
It does help; though it still raises almost as many questions as it answers. I get the difference between parametric and direct modelling -- its why I am continuing to persevere with OS.
The bit that is still bugging me, is why is it consider 'better' to do away with the grid and snaps? There is no conflict I am aware of between their use and parametric models.
Why is it better to draw 4 randomly length lines at random orientations and relative positions, and then apply a bunch of dimensions, equal constraints, parallel constraints, et.al; than to draw a square of the size and position I want with two clicks?
Hello again.
Right, I'll admit it felt pretty good to lash out against what I thought was an injustice yesterday; well for about an hour anyway. After that it just felt stupid to make enemies. It wasn't big, it wasn't clever so I apologise and offer up an explanation of the behaviour you're seeing below as a peace offering. Do with it what you will.
You did indeed have a fully constrained sketch.
The operative word being "did". As soon as you chopped away some of the geometry you chopped away what the remaining geometry was constrained to.
The easy way to tell which constraint is missing is to grab one of the blue points and try to move it around. This will show what degrees of freedom it has. In this case you can see you're free to drag them around what was the circle, so all 4 of those points are unconstrained. Don't worry about messing up the sketch by dragging stuff, a single undo sets it all back into place.
Example doc here:-
There are a couple of ways of fixing this.
(1) Add more constraints / dimensions to the remaining geometry. (OK, but more work, didn't think you'd like this option.)
(2) Convert the unwanted bits to construction geometry rather than deleting it. (OK but still more work.)
(3) Don't delete them at all. We see folks from other CAD systems want to "tidy up" their sketches all the time. Sounds sensible good practice but is unnecessary and just adds more work. There is nothing you can do with the chopped down sketch that you couldn't do with the original one. This is because OS sees sketch "regions" so we don't have to say extrude the entire sketch, we can pick which regions we want to extrude and make one solid part from multiple regions.
Like so:-
Hope some of that is of interest.
Owen S.
HWM-Water Ltd
https://cad.onshape.com/documents/d3b0970eb84d93e90b26fdf5/w/5d8749fed6862d079f36077a/e/f12f8cde46275ab211486e61
And that has yet to have its fillet radii added, and has to be replicated 15 times around the gear. (Im having difficulty picking out the relevant parts of the construction.
On the other hand, whilst a "cleaned up" sketch as in https://cad.onshape.com/documents/d3b0970eb84d93e90b26fdf5/w/5d8749fed6862d079f36077a/e/f12f8cde46275ab211486e61
Isn't a huge improvement in clarity, it does at least allow me to see that I made a mistake in my construction somewhere, which leaves my tooth lopsided.
As for how to satisfy the solvers demands, I haven't (and am not given as far as I can discover) a clue as to what it wants.
(And yes, I'm aware that making the #NoOfTeeth variable a length does not make a whole lot of sense; but it was the only way I could find that would allow me to specify #Pitch in terms of #PitchDiameter/#NoOfTeeth and not get "Enter a valid expression".
And as for how to "undo" my obviously failed attempt at doing a circular pattern:
again I've no idea and can find nothing to assist me. ^Z doesn't do anything that I can detect.
HWM-Water Ltd
I want to revolve this surface; the revolve tool wants me to select the axis or rotation -- in this case, the origin; but it is impossible to do.
It offers me the opportunity to select every construction line on the planet, despite that all of them would involve revolving the surface out of it plane; but not the one entity that would revolve it in-plane.
Any other CAD would allow me to select the origin in the structure tree on the left; no so OS.
You answer will be well don't rotate that, make it a solid and then rotate the solid; but this isn't about this diagram, or gears specifically, its about OS making the basic laborious and difficult and mysterious and frustrating.
And its about OS imposing a set of arbitrary restrictions -- no grids; no (useful) snap points; no way to hide construction lines without deleting them. The list grows longer as my ambitions (small as they are) grow.
Buk
HWM-Water Ltd