Jump to content

extrude node don't work correctly


supermac

Recommended Posts

hi everyone,

first, sorry for my english, i hope you will understand me.


i want extrude a line for creating animation..

my lines come from an object, but for this demo, it's ony simple line node.

when i extrude this simple line, extrude are not possible only if i rotate my line with a transform node.. if my lines are totaly in my axis, i can't extrude him.
it seem me that it's not right..
please, someone have an idea for change this?

my goal is each line are extruded in same orientation.

 

you will find my file in attachement.

you can change switch node for see what i say..

If someone can help me, it will good for me be.

i thank you for read me.

 

 

 

demo_line_XYZaxis.hiplc

Link to comment
Share on other sites

@supermac hm i See that like this!!
Somehow if we take this and use poly expand 2d and then somehow raycast to original shape HM Yupiiiiii Maybeee

90 :wub:

float theta = radians(ch("theta"));
vector p0 = 0;
vector p1 = {1,0,0};
vector p2 = set (cos(theta),sin(theta),0);
vector p3 = cross(p1,p2);

//Detail

addpoint(0,p0);
addpoint(0,p1);
addpoint(0,p2);
addpoint(0,p3);

addprim(0,"polyline",0,1);
setprimattrib(0,"Cd",0,{1,0,0});
addprim(0,"polyline",0,2);
setprimattrib(0,"Cd",1,{0,1,0});
addprim(0,"polyline",0,3);
setprimattrib(0,"Cd",2,{0,0,1});

int sig = p3.z > 0? 1: -1;
@angle1 = (degrees(sig*acos(dot(p1,p2)))+360)%360;
@angle2 = (degrees(atan(dot({0,0,1},p3),dot(p1,p2)))+360)%360;
theta = degrees(theta);

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...