PATH: Delete misplaced and unused files
This commit is contained in:
@@ -25,44 +25,44 @@
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
from FreeCAD import Vector
|
||||
#from FreeCAD import Vector
|
||||
|
||||
|
||||
def equals(p1, p2):
|
||||
'''returns True if vertexes have same coordinates within precision amount of digits '''
|
||||
precision = 12
|
||||
p = precision
|
||||
u = Vector(p1.X, p1.Y, p1.Z)
|
||||
v = Vector(p2.X, p2.Y, p2.Z)
|
||||
vector = (u.sub(v))
|
||||
isNull = (round(vector.x, p) == 0 and round(vector.y, p) == 0 and round(vector.z, p) == 0)
|
||||
return isNull
|
||||
# def equals(p1, p2):
|
||||
# '''returns True if vertexes have same coordinates within precision amount of digits '''
|
||||
# precision = 12
|
||||
# p = precision
|
||||
# u = Vector(p1.X, p1.Y, p1.Z)
|
||||
# v = Vector(p2.X, p2.Y, p2.Z)
|
||||
# vector = (u.sub(v))
|
||||
# isNull = (round(vector.x, p) == 0 and round(vector.y, p) == 0 and round(vector.z, p) == 0)
|
||||
# return isNull
|
||||
|
||||
|
||||
def segments(poly):
|
||||
''' A sequence of (x,y) numeric coordinates pairs '''
|
||||
return zip(poly, poly[1:] + [poly[0]])
|
||||
# def segments(poly):
|
||||
# ''' A sequence of (x,y) numeric coordinates pairs '''
|
||||
# return zip(poly, poly[1:] + [poly[0]])
|
||||
|
||||
|
||||
def check_clockwise(poly):
|
||||
'''
|
||||
check_clockwise(poly) a function for returning a boolean if the selected wire is clockwise or counter clockwise
|
||||
based on point order. poly = [(x1,y1),(x2,y2),(x3,y3)]
|
||||
'''
|
||||
clockwise = False
|
||||
if (sum(x0*y1 - x1*y0 for ((x0, y0), (x1, y1)) in segments(poly))) < 0:
|
||||
clockwise = not clockwise
|
||||
return clockwise
|
||||
# def check_clockwise(poly):
|
||||
# '''
|
||||
# check_clockwise(poly) a function for returning a boolean if the selected wire is clockwise or counter clockwise
|
||||
# based on point order. poly = [(x1,y1),(x2,y2),(x3,y3)]
|
||||
# '''
|
||||
# clockwise = False
|
||||
# if (sum(x0*y1 - x1*y0 for ((x0, y0), (x1, y1)) in segments(poly))) < 0:
|
||||
# clockwise = not clockwise
|
||||
# return clockwise
|
||||
|
||||
|
||||
class FGate:
|
||||
def allow(self, doc, obj, sub):
|
||||
return (sub[0:4] == 'Face')
|
||||
# class FGate:
|
||||
# def allow(self, doc, obj, sub):
|
||||
# return (sub[0:4] == 'Face')
|
||||
|
||||
|
||||
class VGate:
|
||||
def allow(self, doc, obj, sub):
|
||||
return (sub[0:6] == 'Vertex')
|
||||
# class VGate:
|
||||
# def allow(self, doc, obj, sub):
|
||||
# return (sub[0:6] == 'Vertex')
|
||||
|
||||
|
||||
class EGate:
|
||||
@@ -182,14 +182,14 @@ def contourselect():
|
||||
FreeCADGui.Selection.addSelectionGate(CONTOURGate())
|
||||
FreeCAD.Console.PrintWarning("Contour Select Mode\n")
|
||||
|
||||
def fselect():
|
||||
FreeCADGui.Selection.addSelectionGate(FGate())
|
||||
FreeCAD.Console.PrintWarning("Face Select Mode\n")
|
||||
# def fselect():
|
||||
# FreeCADGui.Selection.addSelectionGate(FGate())
|
||||
# FreeCAD.Console.PrintWarning("Face Select Mode\n")
|
||||
|
||||
|
||||
def vselect():
|
||||
FreeCADGui.Selection.addSelectionGate(VGate())
|
||||
FreeCAD.Console.PrintWarning("Vertex Select Mode\n")
|
||||
# def vselect():
|
||||
# FreeCADGui.Selection.addSelectionGate(VGate())
|
||||
# FreeCAD.Console.PrintWarning("Vertex Select Mode\n")
|
||||
|
||||
|
||||
def eselect():
|
||||
|
||||
Reference in New Issue
Block a user