Reply to comment

Should I be doing this?

This could actually be done in one line, but that line would be much longer than my screen is wide.

  1. adjacent = [i for i in self.points if abs(point.x-i.x) < 0.1 and abs(point.y-i.y) < 0.1]
  2. close_vert = [i for i in adjacent if abs(point.z-i.z) < self.thresh]

It just feels like I'm cheating.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

More information about formatting options