Menu

Segment

Nicolas Hainaux

This class is used to manipulate Segments.

A Segment is defined by a couple of Points, being its endpoints.

Possible args for __init__():

  • another Segment
  • (Point, Point)

Fields:

  • points: (read-only) access to the Points of the Segment (what provides access to their names, position etc.); so far a set_point() method has been defined, it should be removed
  • length: (read-only) the real length of the Segment
  • length_name: (read-only) Segment's length's name
  • label: the label of the Segment is used to display an information along the Segment (like its length or anything)
  • mark: check AVAILABLE_SEGMENT_MARKS at the beginning of base_geometry.py to know which mark(s) can be used. They will match eukleides' possibilities. Marks are usually used to indicate which Segments have the same length (in a isosceles Triangle for instance).

Debugging info: no dbg_str() method, so far

Check Segment's complete doc

Back


Related

Doc for dev: Core Objects

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.