예제 #1
0
    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
0
    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()