示例#1
0
    def on_fitButton_clicked(self):
        "Fitting a sphere to the line hoping the sphere to capture a circular movement"
        ids = []

        lps = sl.firstLineAsArray(self.polyLine, ids)
        slps = sl.smoothLine(lps)
        dslps = (len(ids) - slps.shape[0]) / 2

        pts = self.polyLine.GetPoints()

        for (idx, j) in enumerate(range(dslps, len(lps) - dslps)):
            pts.SetPoint(ids[j], slps[idx, :])
示例#2
0
	def on_fitButton_clicked(self):
		"Fitting a sphere to the line hoping the sphere to capture a circular movement"
		ids = []

		lps = sl.firstLineAsArray(self.polyLine, ids)
		slps = sl.smoothLine(lps)
		dslps = (len(ids) - slps.shape[0]) / 2

		pts = self.polyLine.GetPoints()

		for (idx,j) in enumerate(range(dslps, len(lps)-dslps)):
			pts.SetPoint(ids[j], slps[idx,:])
示例#3
0
    def on_smoothButton_clicked(self):
        ids = []

        lps = sl.firstLineAsArray(self.polyLine, ids)
        slps = sl.smoothLine(lps)
        dslps = (len(ids) - slps.shape[0]) / 2

        pts = self.polyLine.GetPoints()

        for (idx, j) in enumerate(range(dslps, len(lps) - dslps)):
            pts.SetPoint(ids[j], slps[idx, :])

        self.RenderLine()

        return
示例#4
0
	def on_smoothButton_clicked(self):
		ids = []

		lps = sl.firstLineAsArray(self.polyLine, ids)
		slps = sl.smoothLine(lps)
		dslps = (len(ids) - slps.shape[0]) / 2

		pts = self.polyLine.GetPoints()

		for (idx,j) in enumerate(range(dslps, len(lps)-dslps)):
			pts.SetPoint(ids[j], slps[idx,:])

		self.RenderLine()

		return