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.

Bi Directional Pattern using relations

Raymon.D.Davies

New member
Hi,


I am trying to create a pattern using relations so I can offset the pattern in some cases and not in otheras seen in the attached picture.


I have 2 dimensions in the first direction and 1 in the second (this is same as 1 of dimension in first). I cannot seem to get this to work. I need this to be parameter driven and the pattern qty to be variable in both directions so I did not use a pattern table. Can anyone help?


View attachment 3511
 
It's always nice when you share the "got it" experience with the poor ignorant folk out here ...


Alex
 
So, are you telling us how? I sure would like to know.
smiley1.gif



those it have to do with pattern relations and these parameters?


/* memb_v - relation driven resultant dimension in this specific direction
/* memb_i - relation driven increment in this specific direction
/* lead_v - leader value (dimension selected to determine direction)
/* idx1 - pattern instance index in the first direction
/* idx2 - pattern instance index in the second direction
 
Hi,


Sorry I didn't explain more, busy day and wasted too much time trying to get this. I had trouble finding information on this and stumbled through it myself, so let me see if I can explain.


You need 2 dimensions in the first direction, one to control the spacing "a" and one to control the offset 'b'. The 'b' dimension will control the stagger in this case. In the second direction we will also have 'b' to control the spacing in this direction.


Rules I have found for creating the relations. You must define memb_i and memb_v, however you cannot have in the in the same relation. This took me some time to understand. Each dimension is each direction can have it's own relation(these are barried, you won't see these in the regular part relations window). Each member of a pattern is assign a idx1 and idx2 to it to make it unique.


Now the relations, I created 1 parameter to control the pattern type. Let's use 'Pattern_Style'(string).


Then create 2 parameters for Controlling the height, lets say 'Y1' and 'Y2'(real number)


In the first direction you need a relations to control Memb_v for each column (b1, b2). So we will make b relation driven.


The relation for b in the first directionwill look like this;


if Pattern_Style == "OFFSET"


if (-1)^idx1 == -1


memb_v = Y2


else


memb_v = Y1


endif


endif


So if you set Pattern style to 'Offset' every other row will use Y2 to drive it, so you actually have a 'b' for each column (b1, b2, etc.)


Now we need to define memb_i, from the rules I did manage to find this is a must. We will write a relation for 'b' in the second direction. We need to create a parameter to control the spacing in the second direction, in this case lets use 'X'.


if IDX1 != 0
memb_i = X*idx2
else
memb_i = X
endif


View attachment 3521


Hope I explained this ok! Like I said I stumbled through this myself and there is not much out there to explain.
 
This is very handy information. Thanks for putting it together.
smiley32.gif



Is this how they make swiss cheese, then?
smiley36.gif
 

Sponsor

Articles From 3DCAD World

Back
Top