Latest revision |
Your text |
Line 120: |
Line 120: |
| Spent last week starting to add support for intersection between paramtric surface. We've decided upon an entirely numeric solution, since algebraic one's are both substantially more complex and prohibitively slow. | | Spent last week starting to add support for intersection between paramtric surface. We've decided upon an entirely numeric solution, since algebraic one's are both substantially more complex and prohibitively slow. |
| Utility Functions: | | Utility Functions: |
− | -Closest Value: returns the closest point in a given interval to a given | + | -Closest Value: returns the closest point in a given interval to a given value used when we step off the edge of a surface. |
− | -value used when we step off the edge of a surface.
| + | -Push: very useful function that updates parameters move a point in a surface along an xyz vector. |
− | -Push: very useful function that updates parameters move a point in a | |
− | -surface along an xyz vector.
| |
| -Step: walks a specified stepsize along the intersection between 2 surfaces. | | -Step: walks a specified stepsize along the intersection between 2 surfaces. |
− | -Jiggle: Given 2 points on different surfaces, that are close to equal, | + | -Jiggle: Given 2 points on different surfaces, that are close to equal, tries to find closer ones. Used both to mitigate inaccuracy due to stepsize, and to find starting points. |
− | -tries to find closer ones. Used both to mitigate inaccuracy due to
| + | -WalkIntersection: Given a starting points walks, the full intersection curve of the two surfaces and returns the resulting Bezier trim Curve. |
− | -stepsize, and to find starting points.
| + | -GetStartPoints: divides up the surface and uses bounding box methods to hone in on starting points, has the huge disadvantage that it finds much more than 1 starting point per curve. |
− | -WalkIntersection: Given a starting points walks, the full intersection | + | -SurfaceSurfaceIntersect: Puts together all the other functions to find starting points, walk them and eliminate duplicate starting points, getting just the intersection curves. |
− | -curve of the two surfaces and returns the resulting Bezier trim Curve.
| |
− | -GetStartPoints: divides up the surface and uses bounding box methods to | |
− | -hone in on starting points, has the huge disadvantage that it finds
| |
− | -much more than 1 starting point per curve.
| |
− | -SurfaceSurfaceIntersect: Puts together all the other functions to find | |
− | -starting points, walk them and eliminate duplicate starting points,
| |
− | -getting just the intersection curves.
| |
− | | |
− | Aug 19th:
| |
− | Have since added a number of functions to round out the functionality of csg system
| |
− | Classes:
| |
− | -Face_X_Event:
| |
− | -analogous to the ON_X_EVENT (which records curve on curve
| |
− | -intersections and curve on surface intersections) but for BrepFace on
| |
− | -BrepFace intersections.
| |
− | Methods:
| |
− | -Face_X_Event::Face_X_Event():
| |
− | -on blank constructor to just make a new
| |
− | -blank instance and one to fill in the values, really nothing to tricky
| |
− | -going on here.
| |
− | -Face_X_Event::Render_Curves():
| |
− | -The intersection between 2 Faces is a subset of the intersection
| |
− | -between the underlying surfaces depending on what the trim loops look
| |
− | -like.
| |
− | -Face_X_Event::Get_ON_X_Events():
| |
− | -Intersects the 2 new curves with all of the trims in the Face loading
| |
− | -the result into the x field in the class.
| |
− | Functions
| |
− | -SplitTrim:
| |
− | -takes a trim and splits it at a given parameter using
| |
− | -ON_Curve::Split(). It then replaces the reference in the m_trim_index
| |
− | -array to the original trim with references to the left and the right
| |
− | -side of the split.
| |
− | -ShatterLoop:
| |
− | -takes a trimming loop of a face and records its constituent trims and
| |
− | -an array. Then it destroys the loop.
| |
− | -Compare_X_Parameter:
| |
− | -compares ON_X_EVENTS by the parameter of the first curve at which they
| |
− | -occurred, used to be passed in to
| |
− | -ON_SimpleArray<ON_X_EVENT>.Quicksort(), and
| |
− | -ON_SimpleArray<ON_X_EVENT>.BinarySearch()
| |
− | -Curve_Compare_start:
| |
− | -Compares 2 curves by starting point, used in
| |
− | -ON_SimpleArray<ON_Curve*>.QuickSort() and
| |
− | -ON_SimpleArray<ON_Curve*>.BinarySearch()
| |
− | -Curve_Compare_end:
| |
− | -same as above yet for endpoints.
| |
− | -SetCurveCurveIntersectionDir:
| |
− | -Same purpose as ON_SetCurveCurveIntersectionDir, which is actually
| |
− | -unimplemented. Sets the dir flags in an intersection event which is
| |
− | -very important for what we're doing.
| |
− | -MakeLoops:
| |
− | -Creates trim loops out of trims by matching them end to end.
| |
− | -IsClosed:
| |
− | -Checks an ON_2dPointArray to see if it's closed, ie start and end
| |
− | -within some tolerance of one another, and atleast one other point
| |
− | -outside that tolerance.
| |
− | -GetStartPointsInternal:
| |
− | -finds starting intersection points between surfaces that are internal
| |
− | -to both surfaces.
| |
− | -GetStartPointsEdges:
| |
− | -finds starting intersection points between surfaces that are one the
| |
− | -edges.
| |
− | -FaceFaceIntersect:
| |
− | -SurfaceSurfaceIntersect has been renamed to FaceFaceIntersect same
| |
− | -functionality but it records results in Face_X_Events thus it needs to
| |
− | -know where to find the faces.
| |
− | -BrepBrepIntersect:
| |
− | -handles the work of intersecting 2 breps, intersects all the possible
| |
− | -face pairs. Gets the results as Face_X_Events, renders the curves and
| |
− | -shatters the loops. Then reconstructs the trims.
| |
− | | |
− | Aug 26:
| |
− | New function CurveCurveIntersect to replace the ON_Curve::IntersectCurve which doesn't actually exist.
| |