math operations in relations

how do you insert math symbols (cos tan pi etc) into a relation?

how do you turn an absolute number into an integer by rounding? (Required for instance to calculate the number of instances of a pattern).

example, number of instances of a rotational pattern:

p1=(d2*pi)/d3

where

p1 = number of instances d2 = pitch diameter d3 = circumferential pitch of instance

Reply to
dakeb
Loading thread data ...

From Rod Giles:-

Dear David,

Relations editor recognises the following mathematical constants:

pi

Relations editor recognises the following mathematical, logical and internal

functions (Wildfire 2.0):

+

-

/

*

^

abs

acos

asin

atan

atan2

cable_len

ceil

comparegraphs

cos

cosh

eang

ecoordx

ecoordy

edist

elen

evalgraph

exists

exp

extract

false

floor

if

itos

ln

log

lookup_inst

massprop_param

material_param

max

min

mp_assigned_mass

mp_cg_x

mp_cg_y

mp_cg_z

mp_mass

mp_surf_area

mp_volume

no

rel_model_name

rel_model_type

search

sim_load_value

sim_mc_value

sim_shell_thickness

sin

sinh

smt_def_bend_rad

smt_thickness

sqrt

string_length

tan

tanh

trajpar

trajpar_of_pnt

true

yes

Click on the function button to see a list. If you're working on 2001 you

need to apply the following config options:

new_relation_ui yes

new_parameter_ui yes

I make sure you have an integer number, use ceil (ceiling function) or floor

(floor function), depending on whether you what 1 more or 1 less, e.g. if

your equation resulted in p1 = 3.26, then floor(3.26) = 3, ceil(3.26) = 4.

Adjust the formula,

p1=ceil((d2*pi)/d3)

p1=floor((d2*pi)/d3)

according to your requirement.

Hope this helps,

Rod Giles

Technical Director

Elite Consulting Ltd.

formatting link

Pro/Enginer Consultants, Trainers and Value Added Reseller

Reply to
dakeb

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.