forked from AERoport/samocadJ
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abstract ZeroCoordsProtection in Shape. Add circle and arc snap lists…
… to Shape, Circle and Arc snap entities.
- Loading branch information
Showing
9 changed files
with
135 additions
and
10 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
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,38 @@ | ||
package samoJ.PrimitiveArc; | ||
|
||
import samoJ.Coord; | ||
import samoJ.PrimitiveCircle.Circle; | ||
|
||
/** | ||
* Entity for snap to arc, one of basic snap entities (line, circle, arc) | ||
* @author vlad | ||
* | ||
*/ | ||
public class Arc extends Circle { | ||
private float start; | ||
private float extent; | ||
/** | ||
* | ||
* @param Center | ||
* @param Radius | ||
* @param start angle counterclockwise (0 = 360 = 3 o'clock) | ||
* @param extent angle counterclockwise (0 = 360 = 3 o'clock) | ||
*/ | ||
public Arc(Coord Center, float Radius, float start, float extent) { | ||
super(Center, Radius); | ||
this.start = start; | ||
this.extent = extent; | ||
} | ||
|
||
public Arc(float x1, float y1, float z1, float Radius, float start, float extent) { | ||
this(new Coord(x1, y1, z1), Radius, start, extent); | ||
} | ||
|
||
public float getStart() { | ||
return start; | ||
} | ||
|
||
public float getExtent() { | ||
return extent; | ||
} | ||
} |
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,30 @@ | ||
package samoJ.PrimitiveCircle; | ||
|
||
import samoJ.Coord; | ||
|
||
/** | ||
* Entity for snap to circle, one of basic snap entities (line, circle, arc) | ||
* @author vlad | ||
* | ||
*/ | ||
public class Circle { | ||
private Coord Center; | ||
private float Radius; | ||
|
||
public Circle(Coord Center, float Radius) { | ||
this.Center = Center; | ||
this.Radius = Radius; | ||
} | ||
|
||
public Circle(float x1, float y1, float z1, float Radius) { | ||
this(new Coord(x1, y1, z1), Radius); | ||
} | ||
|
||
public Coord getCenter() { | ||
return Center; | ||
} | ||
|
||
public float getRadius() { | ||
return Radius; | ||
} | ||
} |
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
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
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