-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the cli so that curves are properly parsed.
- Loading branch information
Showing
11 changed files
with
90 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,6 @@ target/ | |
|
||
#IntelliJ Files | ||
*.idea | ||
|
||
#Subdivision Log Generator log file | ||
logs/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
A simplistic Logger class which wraps the Python logging class | ||
@author Peter Zaffetti | ||
@date 10/10/2017 | ||
""" | ||
import logging | ||
import os | ||
|
||
|
||
def get_logger(classname=None): | ||
log_dir = "logs" | ||
if not os.path.exists(log_dir): | ||
os.makedirs(log_dir) | ||
|
||
logging.basicConfig(filename="logs/generator_log.txt", level="DEBUG") | ||
|
||
if classname is None: | ||
classname = "Subdivision Generator" | ||
|
||
return logging.getLogger(classname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)" | ||
|
||
$SCRIPT_DIR/user_interface/cli_application.py $* | ||
"$SCRIPT_DIR/user_interface/cli_application.py" $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python | ||
""" | ||
@author Peter Zaffetti 2017 | ||
""" | ||
import unittest | ||
from data_objects.point import Point, distance_between_points | ||
|
||
|
||
class PointTest(unittest.TestCase): | ||
origin_test_point = Point(0, 0, 0) | ||
test_point = Point(12, 8, 4) | ||
|
||
def test_getters(self): | ||
self.assertTrue(self.test_point.get_x() == 12) | ||
self.assertTrue(self.test_point.get_y() == 8) | ||
self.assertTrue(self.test_point.get_z() == 4) | ||
|
||
def test_distance_between_points(self): | ||
"""Test the distance from the origin to 12, 8 , 4 -> it should be about 14.96662954""" | ||
distance = distance_between_points(self.origin_test_point, self.test_point) | ||
self.assertTrue( distance == 14.96662954) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters