2021-04-10 12:02 PM - last edited on 2021-09-14 09:17 AM by Noemi Balogh
BRICK LA, LA, HT
SWEEP 4, 2, 0, 1, 1+2+4+16+32, 0, 0, 0, L, 0, 0, L, L, 0, 0, L, 0, 0, 0, 0, 0, 0, HTThis does not seem to be an issue while rendering so it's probably just a display issue
Solved! Go to Solution.
2021-04-13 10:47 AM
2021-04-10 06:52 PM
2021-04-12 11:53 AM
Pertti wrote:Hello Pertti,
If You add 64*j7 to the mask value then the result is "square"
j1=1! base surface is present,
j2=1! top surface is present,
j3=1! side surface is present,
j5=1! base edges are visible,
j6=1! top edges are visible,
j7=1! cross-section edges are visible, surface is articulated.
mask = j1 + 2*j2 + 4*j3 + 16*j5 + 32*j6 + 64*j7
!mask=1+2+4+16+32
L=1
HT=3
SWEEP 4, 2, 0, 1, mask,
0, 0, 0,
L, 0, 0,
L, L, 0,
0, L, 0,
0, 0, 0,
0, 0, HT
2021-04-12 12:24 PM
2021-04-12 02:10 PM
Pertti wrote:Because I do not necessarily know the coordinates of the top polygon. If it's only vertical, it's easy but if it's inclined it's not any more. Which is why it was easier to use SWEEP as I could only specify deltas from known values.
Ok, there is still one command, "RULED". Why don´t You try it?
2021-04-12 10:16 PM
!this formula calculates sz height of a point S(sx,sy) on a plane P1,P2,P3 !3d program dim Point[][] Point[1][1]=1.0 Point[2][1]=1.0 Point[3][1]=5.0 Point[1][2]=1.0 Point[2][2]=5.0 Point[3][2]=3.0 Point[1][3]=1.0 Point[2][3]=2.1 Point[3][3]=1.5 sx=2 sy=3 add Point[1][1],Point[1][2],Point[1][3]:sphere.1:del 1 add Point[2][1],Point[2][2],Point[2][3]:sphere.1:del 1 add Point[3][1],Point[3][2],Point[3][3]:sphere.1:del 1 lin_ Point[1][1],Point[1][2],Point[1][3],Point[2][1],Point[2][2],Point[2][3] lin_ Point[2][1],Point[2][2],Point[2][3],Point[3][1],Point[3][2],Point[3][3] lin_ Point[3][1],Point[3][2],Point[3][3],Point[1][1],Point[1][2],Point[1][3] dx1=Point[1][1]-Point[3][1] dy1=Point[1][2]-Point[3][2] dz1=Point[1][3]-Point[3][3] dx2=Point[2][1]-Point[3][1] dy2=Point[2][2]-Point[3][2] dz2=Point[2][3]-Point[3][3] s1=dy1*dz2-dz1*dy2 s2=dz1*dx2-dx1*dz2 s3=dx1*dy2-dy1*dx2 d=-s1*Point[3][1]-s2*Point[3][2]-s3*Point[3][3] sz=(-s1*sx-s2*sy-d)/s3 add sx,sy,sz:sphere.15:del 1
2021-04-13 02:53 AM
MetalFingerz wrote:I would have a look at TUBE.
Just for info, the reason I would like to use the SWEEP instead of a simple BRICK is that I need to parametrically change the top for both Z (delta from ZZYZX) and X (delta from sweep origin) values and that the top would need to still be cut perpendicularly to the side faces.
I tried using EXTRUDE for that but the top was always horizontally cut which was not the desired effect. Maybe I'm not using the proper command and it would be better to use a BRICK and then have some trigonometry to recalculate the base angle dynamically
2021-04-13 10:47 AM
2021-04-14 10:37 AM
Peter wrote:That's what I ended up doing ultimately. I just had to relearned some trigo which I had forgotten
With TUBE you will have trouble defining the rotation along the axis. I recommend BRICK and trigonometry to calculate the rotation. You'd have to do the same for a correct TUBE too.