Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Relations Trouble

Jonathan21409

New member
I am creating an assembly with relations somy co-workers and iwillonly have to change two dimensions to create anew assemblytoour own specifications.I have run into trouble however with a pattern and controlling its spacing as well as the number of items it creates. Currently I have the model creating the right number of parts however, the spacing is not flush at the end because it rounds to a whole number for creating the new pattern, which is great for the pattern but not good for the patterns spacing. The only thing that i can think of to fix this problem would be to create a new line for spacing that makes the number for the pattern a whole number and change the spacing to a different amount.


This is my formula so far.



/*number of blades
p79=(d1:54-5.88)/6.88


The pattern is making an air vent and is for the number of blades in the vent. There is one top blade that is always there which is represented by 5.88 which is subtracted from the total length (d1:54). then the 6.88 represents the distance between the blades in the pattern, I know that i need to change that to a value such as "N" however i cannot figure out how to create a formula to figure out if a number is whole or not.





Thank you for your help.
 
Use one of these to get an interger

<table ="whs9" x-use-null-cells="" cellspacing="0" width="415"><t><tr ="whs4" valign="top">
<td ="whs14" height="38" width="96">
ceil()</td>
<td ="whs15" height="38" width="319">
the smallest integer not less than the real value
</td></tr>
<tr ="whs4" valign="top">
<td ="whs14" height="38" width="96">
floor()</td>
<td ="whs15" height="38" width="319">
the largest integer not greater than the real
value</td></tr></t></table>
 
The way I check to determine if something is a whole number is as dr_gallup says


N=(d:54-5.88)/6.88
IF (ceil(N) != floor(N))
N=floor((d:54-5.88)/6.88)
endif
 
Thank you for all of your help dr_gallup and robertib I was able to solve the problem and now have it working perfectly.
smiley4.gif
 

Sponsor

Articles From 3DCAD World

Back
Top