Commit 1ecb4c0b authored by paulusmax's avatar paulusmax

Put in a bunch of debug messages which are commented out in the search for why...

Put in a bunch of debug messages which are commented out in the search for why this triangle (and some others)  don't work right with the cylindrical cutter....
seems to have something to do with it being upside down.... as problem doesn't happen when right side up.
seems to have to do with the "circle_triangle" detection scheme.

git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1073 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 07552ff6
...@@ -101,6 +101,7 @@ if "_MEIPASS2" in os.environ: ...@@ -101,6 +101,7 @@ if "_MEIPASS2" in os.environ:
EXAMPLE_MODEL_LOCATIONS.insert(0, os.path.join(os.path.normpath( EXAMPLE_MODEL_LOCATIONS.insert(0, os.path.join(os.path.normpath(
os.environ["_MEIPASS2"]), "samples")) os.environ["_MEIPASS2"]), "samples"))
DEFAULT_MODEL_FILE = "pycam-textbox.stl" DEFAULT_MODEL_FILE = "pycam-textbox.stl"
#DEFAULT_MODEL_FILE = "problem_1_triangle.stl"
EXIT_CODES = {"ok": 0, "requirements": 1, "load_model_failed": 2, EXIT_CODES = {"ok": 0, "requirements": 1, "load_model_failed": 2,
"write_output_failed": 3, "parsing_failed": 4, "write_output_failed": 3, "parsing_failed": 4,
"server_without_password": 5, "connection_error": 6} "server_without_password": 5, "connection_error": 6}
......
[ProcessDefault]
engrave_offset: 0.0
pocketing_type: none
[Process0]
name: Remove material y
path_strategy: PushRemoveStrategy
path_direction: y
milling_style: ignore
material_allowance: 0.01
overlap_percent: 25
step_down: 0.12
[Process1]
name: Carve contour
path_strategy: ContourPolygonStrategy
path_direction: x
milling_style: ignore
material_allowance: 0.01
overlap_percent: 40
step_down: 1.0
[Process2]
name: Cleanup x
path_strategy: SurfaceStrategy
path_direction: x
milling_style: ignore
material_allowance: 0.0
overlap_percent: 75
step_down: 0.11811023622
[Process3]
name: cleanup y
path_strategy: SurfaceStrategy
path_direction: y
milling_style: ignore
material_allowance: 0.0
overlap_percent: 75
step_down: 0.11811023622
[Process4]
name: Gravure
path_strategy: EngraveStrategy
path_direction: x
milling_style: conventional
material_allowance: 0.0
overlap_percent: 50
step_down: 0.0393700787402
[Tool0]
name: Cylindrical
shape: CylindricalCutter
tool_radius: 0.0625
torus_radius: 0.25
feedrate: 60.0
speed: 10000.0
[Tool1]
name: Toroidal
shape: ToroidalCutter
tool_radius: 0.062
torus_radius: 0.02
feedrate: 30.0
speed: 1000.0
[Tool2]
name: Spherical
shape: SphericalCutter
tool_radius: 0.0625
torus_radius: 0.00984251968504
feedrate: 30.0
speed: 1000.0
[TaskDefault]
tool: 0
[Task0]
name: Rough top
process: 0
bounds: 0
enabled: 0
[Task1]
name: rough2 bottom
process: 0
bounds: 0
enabled: 0
[Task2]
name: finish x top
process: 2
bounds: 0
enabled: 0
[Task3]
name: finish x middle
process: 2
bounds: 0
enabled: 0
[Task4]
name: finish x bottom
process: 2
bounds: 2
enabled: 0
[Task5]
name: finish y top
process: 3
bounds: 0
enabled: 0
[Task6]
name: finish y middle
process: 3
bounds: 0
enabled: 0
[Task7]
name: finish y bottom
process: 3
bounds: 2
enabled: 1
[BoundsDefault]
type: relative_margin
z_high: 0.0
[Bounds0]
name: Minimum
x_low: 0.0
x_high: 0.0
y_low: 0.0
y_high: 0.0
z_low: 0.0
[Bounds1]
name: 10% margin
x_low: 0.1
x_high: 0.1
y_low: 0.1
y_high: 0.1
z_low: 0.05
[Bounds2]
name: problem
x_low: -0.13
x_high: -0.83
y_low: -0.28
y_high: -0.68
z_low: 0.05
solid vcg
facet normal -2.847750e-02 1.220272e-01 -9.921181e-01
outer loop
vertex 8.845570e-01 1.323334e+00 8.942510e-01
vertex 8.742290e-01 1.593305e+00 9.277530e-01
vertex 1.152810e+00 1.435092e+00 9.002970e-01
endloop
endfacet
endsolid vcg
...@@ -178,6 +178,8 @@ class CylindricalCutter(BaseCutter): ...@@ -178,6 +178,8 @@ class CylindricalCutter(BaseCutter):
cl = cl_t cl = cl_t
cp = cp_t cp = cp_t
if cl and (direction.x == 0) and (direction.y == 0): if cl and (direction.x == 0) and (direction.y == 0):
#print 'circle_triangle:'
#print 'cl is:', cl, 'd is:', d, 'cp is:', cp
return (cl, d, cp) return (cl, d, cp)
(cl_e1, d_e1, cp_e1) = self.intersect_circle_edge(direction, (cl_e1, d_e1, cp_e1) = self.intersect_circle_edge(direction,
triangle.e1, start=start) triangle.e1, start=start)
...@@ -189,15 +191,20 @@ class CylindricalCutter(BaseCutter): ...@@ -189,15 +191,20 @@ class CylindricalCutter(BaseCutter):
d = d_e1 d = d_e1
cl = cl_e1 cl = cl_e1
cp = cp_e1 cp = cp_e1
#print 'circle_edge e1:'
if d_e2 < d: if d_e2 < d:
d = d_e2 d = d_e2
cl = cl_e2 cl = cl_e2
cp = cp_e2 cp = cp_e2
#print 'circle_edge e2:'
if d_e3 < d: if d_e3 < d:
d = d_e3 d = d_e3
cl = cl_e3 cl = cl_e3
cp = cp_e3 cp = cp_e3
#print 'circle_edge e3:'
if cl and (direction.x == 0) and (direction.y == 0): if cl and (direction.x == 0) and (direction.y == 0):
#print 'circle_edge:'
#print 'cl is:', cl, 'd is:', d, 'cp is:', cp
return (cl, d, cp) return (cl, d, cp)
(cl_p1, d_p1, cp_p1) = self.intersect_circle_vertex(direction, (cl_p1, d_p1, cp_p1) = self.intersect_circle_vertex(direction,
triangle.p1, start=start) triangle.p1, start=start)
...@@ -209,15 +216,20 @@ class CylindricalCutter(BaseCutter): ...@@ -209,15 +216,20 @@ class CylindricalCutter(BaseCutter):
d = d_p1 d = d_p1
cl = cl_p1 cl = cl_p1
cp = cp_p1 cp = cp_p1
#print 'circle vertex p1:'
if d_p2 < d: if d_p2 < d:
d = d_p2 d = d_p2
cl = cl_p2 cl = cl_p2
cp = cp_p2 cp = cp_p2
#print 'circle vertex p2:'
if d_p3 < d: if d_p3 < d:
d = d_p3 d = d_p3
cl = cl_p3 cl = cl_p3
cp = cp_p3 cp = cp_p3
#print 'circle vertex p3:'
if cl and (direction.x == 0) and (direction.y == 0): if cl and (direction.x == 0) and (direction.y == 0):
#print 'circle vertex:'
#print 'cl is:', cl, 'd is:', d, 'cp is:', cp
return (cl, d, cp) return (cl, d, cp)
if (direction.x != 0) or (direction.y != 0): if (direction.x != 0) or (direction.y != 0):
(cl_p1, d_p1, cp_p1) = self.intersect_cylinder_vertex(direction, (cl_p1, d_p1, cp_p1) = self.intersect_cylinder_vertex(direction,
...@@ -230,14 +242,17 @@ class CylindricalCutter(BaseCutter): ...@@ -230,14 +242,17 @@ class CylindricalCutter(BaseCutter):
d = d_p1 d = d_p1
cl = cl_p1 cl = cl_p1
cp = cp_p1 cp = cp_p1
#print 'cyl vertex p1:'
if d_p2 < d: if d_p2 < d:
d = d_p2 d = d_p2
cl = cl_p2 cl = cl_p2
cp = cp_p2 cp = cp_p2
#print 'cyl vertex p2:'
if d_p3 < d: if d_p3 < d:
d = d_p3 d = d_p3
cl = cl_p3 cl = cl_p3
cp = cp_p3 cp = cp_p3
#print 'cyl vertex p3:'
(cl_e1, d_e1, cp_e1) = self.intersect_cylinder_edge(direction, (cl_e1, d_e1, cp_e1) = self.intersect_cylinder_edge(direction,
triangle.e1, start=start) triangle.e1, start=start)
(cl_e2, d_e2, cp_e2) = self.intersect_cylinder_edge(direction, (cl_e2, d_e2, cp_e2) = self.intersect_cylinder_edge(direction,
...@@ -248,13 +263,18 @@ class CylindricalCutter(BaseCutter): ...@@ -248,13 +263,18 @@ class CylindricalCutter(BaseCutter):
d = d_e1 d = d_e1
cl = cl_e1 cl = cl_e1
cp = cp_e1 cp = cp_e1
#print 'cyl edge e1:'
if d_e2 < d: if d_e2 < d:
d = d_e2 d = d_e2
cl = cl_e2 cl = cl_e2
cp = cp_e2 cp = cp_e2
#print 'cyl edge e2:'
if d_e3 < d: if d_e3 < d:
d = d_e3 d = d_e3
cl = cl_e3 cl = cl_e3
cp = cp_e3 cp = cp_e3
#print 'cyl edge e3:'
#print 'cyl:'
#print 'cl is:', cl, 'd is:', d, 'cp is:', cp
return (cl, d, cp) return (cl, d, cp)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment