Skip to content

Commit 54e874e

Browse files
committed
Merge pull request #37 from Microsoft/dev
moved IPathIntersection into root module
2 parents ccf5fca + 0e31574 commit 54e874e

File tree

3 files changed

+46
-46
lines changed

3 files changed

+46
-46
lines changed

src/core/intersect.ts

-25
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,6 @@
22

33
module MakerJs.path {
44

5-
/**
6-
* An intersection of two paths.
7-
*/
8-
export interface IPathIntersection {
9-
10-
/**
11-
* Array of points where the two paths intersected. The length of the array may be either 1 or 2 points.
12-
*/
13-
intersectionPoints: IPoint[];
14-
15-
/**
16-
* This Array property will only be defined if the first parameter passed to pathIntersection is either an Arc or a Circle.
17-
* It contains the angles of intersection relative to the first path parameter.
18-
* The length of the array may be either 1 or 2.
19-
*/
20-
path1Angles?: number[];
21-
22-
/**
23-
* This Array property will only be defined if the second parameter passed to pathIntersection is either an Arc or a Circle.
24-
* It contains the angles of intersection relative to the second path parameter.
25-
* The length of the array may be either 1 or 2.
26-
*/
27-
path2Angles?: number[];
28-
}
29-
305
/**
316
* @private
327
*/

src/core/maker.ts

+25
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,31 @@ module MakerJs {
251251
Arc: "arc"
252252
};
253253

254+
/**
255+
* An intersection of two paths.
256+
*/
257+
export interface IPathIntersection {
258+
259+
/**
260+
* Array of points where the two paths intersected. The length of the array may be either 1 or 2 points.
261+
*/
262+
intersectionPoints: IPoint[];
263+
264+
/**
265+
* This Array property will only be defined if the first parameter passed to pathIntersection is either an Arc or a Circle.
266+
* It contains the angles of intersection relative to the first path parameter.
267+
* The length of the array may be either 1 or 2.
268+
*/
269+
path1Angles?: number[];
270+
271+
/**
272+
* This Array property will only be defined if the second parameter passed to pathIntersection is either an Arc or a Circle.
273+
* It contains the angles of intersection relative to the second path parameter.
274+
* The length of the array may be either 1 or 2.
275+
*/
276+
path2Angles?: number[];
277+
}
278+
254279
//models
255280

256281
export interface IPathMap {

target/ts/makerjs.d.ts

+21-21
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,27 @@ declare module MakerJs {
185185
Circle: string;
186186
Arc: string;
187187
};
188+
/**
189+
* An intersection of two paths.
190+
*/
191+
interface IPathIntersection {
192+
/**
193+
* Array of points where the two paths intersected. The length of the array may be either 1 or 2 points.
194+
*/
195+
intersectionPoints: IPoint[];
196+
/**
197+
* This Array property will only be defined if the first parameter passed to pathIntersection is either an Arc or a Circle.
198+
* It contains the angles of intersection relative to the first path parameter.
199+
* The length of the array may be either 1 or 2.
200+
*/
201+
path1Angles?: number[];
202+
/**
203+
* This Array property will only be defined if the second parameter passed to pathIntersection is either an Arc or a Circle.
204+
* It contains the angles of intersection relative to the second path parameter.
205+
* The length of the array may be either 1 or 2.
206+
*/
207+
path2Angles?: number[];
208+
}
188209
interface IPathMap {
189210
[id: string]: IPath;
190211
}
@@ -632,27 +653,6 @@ declare module MakerJs.solvers {
632653
function solveTriangleASA(oppositeAngleInDegrees: number, lengthOfSideBetweenAngles: number, otherAngleInDegrees: number): number;
633654
}
634655
declare module MakerJs.path {
635-
/**
636-
* An intersection of two paths.
637-
*/
638-
interface IPathIntersection {
639-
/**
640-
* Array of points where the two paths intersected. The length of the array may be either 1 or 2 points.
641-
*/
642-
intersectionPoints: IPoint[];
643-
/**
644-
* This Array property will only be defined if the first parameter passed to pathIntersection is either an Arc or a Circle.
645-
* It contains the angles of intersection relative to the first path parameter.
646-
* The length of the array may be either 1 or 2.
647-
*/
648-
path1Angles?: number[];
649-
/**
650-
* This Array property will only be defined if the second parameter passed to pathIntersection is either an Arc or a Circle.
651-
* It contains the angles of intersection relative to the second path parameter.
652-
* The length of the array may be either 1 or 2.
653-
*/
654-
path2Angles?: number[];
655-
}
656656
/**
657657
* Find the point(s) where 2 paths intersect.
658658
*

0 commit comments

Comments
 (0)