To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10517
10516  |  10518
Subject: 
Re: LSynth electric cable cross section oriention problem
Newsgroups: 
lugnet.cad.dev
Date: 
Sun, 26 Nov 2006 16:06:12 GMT
Viewed: 
2788 times
  
In lugnet.cad.dev, Kevin L. Clague wrote:
I've got up/side/front vector stuff working now, so that I can control the
orientation of cross sections of electrical cables at the start of a segment
defined by two constraints.

My issue now is that I don't know how to force the twist so that the electrical
cable cross sections at the end of a segment (at the second constraint) are
aligned with the second constraint.

I can get the start to look good, but don't know how to make the ends line up
correctly.

Constraint->crossection|crosssection|crosssection->Constraint...

The first cross sections are properly aligned with the first constraints, but
the ending cross sections are not aligned with the second constraint.

Anyone have any ideas on what to do to have the end be properly constrainted?

Kevin

Leo,

  In case you didn't get this far, I solved the above problem and can now
control twist all through a cable segment from start point to end point.

  I calculate the up vector for the start of segment, and the up vector for the
end of segment.  I also calculate the entire length of the segment.

  At each new cross section, I calculate how far we are down the total length,
and calculate the current up vector based on the start_up, end_up, and
current_length/total length.

  normalized = current_length/total_length;

  up[0] = start_up[0]*(1-normalized) + end_up[0]*normalized; // x
  up[1] = start_up[1]*(1-normalized) + end_up[1]*normalized; // y
  up[2] = start_up[2]*(1-normalized) + end_up[2]*normalized; // z;

  normalized = sqrt(up[0]*up[0]+up[1]*up[1]+up[2]*up[2]);
  up[0] /= normalized;
  up[1] /= normalized;
  up[2] /= normalized;


Kevin



Message has 1 Reply:
  Re: LSynth electric cable cross section oriention problem
 
(...) Hi Kevin, Another possibility to investigate is to change the up vector in inverse proportion to the bezier curve change. That would mean it would twist less where there's a sharper bend, and would possibly end up looking more authentic. But (...) (18 years ago, 26-Nov-06, to lugnet.cad.dev)

Message is in Reply To:
  Re: LSynth electric cable cross section oriention problem
 
I've got up/side/front vector stuff working now, so that I can control the orientation of cross sections of electrical cables at the start of a segment defined by two constraints. My issue now is that I don't know how to force the twist so that the (...) (18 years ago, 24-Nov-06, to lugnet.cad.dev)

5 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR