本文整理汇总了Python中line.Line.bissection方法的典型用法代码示例。如果您正苦于以下问题:Python Line.bissection方法的具体用法?Python Line.bissection怎么用?Python Line.bissection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类line.Line
的用法示例。
在下文中一共展示了Line.bissection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makeVCurveR
# 需要导入模块: from line import Line [as 别名]
# 或者: from line.Line import bissection [as 别名]
def makeVCurveR(self):
parts = []
vCurvesHeight = self.vCurvesHeight
vCurvesWidth = self.vCurvesWidth
vCurvesDepth = self.vCurvesDepth
v21 = Base.Vector(self.stopsWidth+self.botCurveWidth,0,self.botCurveHeight+self.stopsHeight);
v22 = v21+Base.Vector(-vCurvesWidth,0,vCurvesHeight);
l2 = Line().fromPoints((v21.x, v21.z), (v22.x, v22.z))
p23 = l2.pointAtDist(l2.length() - self.stopsHeight)
v23 = Base.Vector(p23[0], 0, p23[1])
l3 = Line().fromPoints((v21.x, v21.z), (v23.x, v23.z))
p21 = l3.bissection().pointAtDist(vCurvesDepth)
c21 = Base.Vector(p21[0],0,p21[1])
l4 = Line().fromPoints((v23.x, v23.z), (v22.x, v22.z))
p31 = l4.bissection().pointAtDist(self.stopsWidth/2)
c31 = Base.Vector(p31[0],0,p31[1])
parts.append(Part.Arc(v21,c21,v23).toShape())
parts.append(Part.Arc(v23,c31,v22).toShape())
s1 = Part.Shape(parts)
return parts
示例2: makeVCurveL
# 需要导入模块: from line import Line [as 别名]
# 或者: from line.Line import bissection [as 别名]
def makeVCurveL(self):
vCurvesHeight = self.vCurvesHeight
vCurvesWidth = self.vCurvesWidth
vCurvesDepth = self.vCurvesDepth
v21 = Base.Vector(self.stopsWidth,0,self.botCurveHeight);
v11 = v21 + Base.Vector(-(1-self.stopRatio)*self.stopsWidth,0,self.stopsHeight)
v12 = v11+Base.Vector(vCurvesWidth,0,vCurvesHeight);
l = Line().fromPoints((v11.x, v11.z), (v12.x, v12.z))
c11 = l.bissection().pointAtDist(-vCurvesDepth)
cv11 = Base.Vector(c11[0],0,c11[1])
a1 = Part.Arc(v12,cv11,v11)
return a1.toShape()