QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
opennurbs_surface.h
Go to the documentation of this file.
1/* $NoKeywords: $ */
2/*
3//
4// Copyright (c) 1993-2007 Robert McNeel & Associates. All rights reserved.
5// Rhinoceros is a registered trademark of Robert McNeel & Assoicates.
6//
7// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
8// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
9// MERCHANTABILITY ARE HEREBY DISCLAIMED.
10//
11// For complete openNURBS copyright information see <http://www.opennurbs.org>.
12//
14*/
15
17//
18// Definition of virtual parametric surface
19//
21
22#if !defined(OPENNURBS_SURFACE_INC_)
23#define OPENNURBS_SURFACE_INC_
24
25class ON_Curve;
26class ON_NurbsSurface;
27class ON_SurfaceTree;
28
29/* $Header: /src3/opennurbs/opennurbs_surface.h 3 9/17/01 4:21p Dalelear $ */
30/* $NoKeywords: $ */
31/*
32//
33// Copyright (c) 1993-2001 Robert McNeel & Associates. All rights reserved.
34// Rhinoceros is a registered trademark of Robert McNeel & Assoicates.
35//
36// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
37// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
38// MERCHANTABILITY ARE HEREBY DISCLAIMED.
39//
40// For complete openNURBS copyright information see <http://www.opennurbs.org>.
41//
43*/
44
46//
47// Definition of virtual parametric surface
48//
50
51class ON_Mesh;
53class ON_PolyCurve;
54class ON_CurveProxy;
55class ON_Surface;
56
58{
60
61public:
62 // virtual ON_Object::DestroyRuntimeCache override
63 void DestroyRuntimeCache( bool bDelete = true );
64
65 // pure virtual class for surface objects
66public:
67
68 // flags for isoparametric curves
69 // note: odd values are all "x" = constant
70 // and even values > 0 are all "y" = constant
71 // ON_BrepTrim::m_iso uses these flags
72 enum ISO
73 {
74 not_iso = 0, // curve is not an isoparameteric curve
75 x_iso = 1, // curve is a "x" = constant (vertical) isoparametric
76 // curve in the interior of the surface's domain
77 y_iso = 2, // curve is a "y" = constant (horizontal) isoparametric
78 // curve in the interior of the surface's domain
79 W_iso = 3, // curve is a "x" = constant isoparametric curve
80 // along the west side of the surface's domain
81 S_iso = 4, // curve is a "y" = constant isoparametric curve
82 // along the south side of the surface's domain
83 E_iso = 5, // curve is a "x" = constant isoparametric curve
84 // along the east side of the surface's domain
85 N_iso = 6, // curve is a "y" = constant isoparametric curve
86 // along the north side of the surface's domain
87 iso_count = 7
88 };
89
90public:
91 ON_Surface();
92 ON_Surface(const ON_Surface&);
94 virtual ~ON_Surface();
95
96 // virtual ON_Object::SizeOf override
97 unsigned int SizeOf() const;
98
99 // virtual ON_Geometry override
100 bool EvaluatePoint( const class ON_ObjRef& objref, ON_3dPoint& P ) const;
101
102 /*
103 Description:
104 Get a duplicate of the surface.
105 Returns:
106 A duplicate of the surface.
107 Remarks:
108 The caller must delete the returned surface.
109 For non-ON_SurfaceProxy objects, this simply duplicates the surface using
110 ON_Object::Duplicate.
111 For ON_SurfaceProxy objects, this duplicates the actual proxy surface
112 geometry and, if necessary, transposes the result to that
113 the returned surfaces's parameterization and locus match the proxy surface's.
114 */
115 virtual
116 ON_Surface* DuplicateSurface() const;
117
119 // override ON_Object::ObjectType() - returns ON::surface_object
120 ON::object_type ObjectType() const;
121
122
124 //
125 // virtual ON_Geometry functions
126 //
127
128 /*
129 Description:
130 Overrides virtual ON_Geometry::HasBrepForm and returns true.
131 Result:
132 Returns true.
133 See Also:
134 ON_Brep::Create( ON_Surface&* )
135 */
136 ON_BOOL32 HasBrepForm() const;
137
138 /*
139 Description:
140 Overrides virtual ON_Geometry::HasBrepForm.
141 Uses ON_Brep::Create( ON_Surface&* ) to create a brep
142 form. The surface is copied for use in the returned
143 brep.
144 Parameters:
145 brep - [in] if not NULL, brep is used to store the brep
146 form of the surface.
147 Result:
148 Returns a pointer to on ON_Brep or NULL. If the brep
149 parameter is not NULL, then brep is returned if the
150 surface has a brep form and NULL is returned if the
151 geometry does not have a brep form.
152 Remarks:
153 The caller is responsible for managing the brep memory.
154 */
155 ON_Brep* BrepForm( ON_Brep* brep = NULL ) const;
156
158 // surface interface
159
160 /*
161 Description:
162 Computes a polygon mesh approximation of the surface.
163 Parameters:
164 mp - [in] meshing parameters
165 mesh - [in] if not NULL, the surface mesh will be put
166 into this mesh.
167 Returns:
168 A polygon mesh of the surface.
169 Remarks:
170 This virtual function works in the openNURBS that is
171 part of the Rhino SDK. The source code for this
172 functionallity is not provided in the free openNURBS
173 toolkit.
174 */
175 virtual
176 ON_Mesh* CreateMesh(
177 const ON_MeshParameters& mp,
178 ON_Mesh* mesh = NULL
179 ) const;
180
181 ON_BOOL32 GetDomain(
182 int dir, // 0 gets first parameter, 1 gets second parameter
183 double* t0,
184 double* t1
185 ) const;
186
187 bool SetDomain(
188 int dir, // 0 sets first parameter's domain, 1 gets second parameter's domain
189 ON_Interval domain
190 );
191
192 virtual
193 ON_BOOL32 SetDomain(
194 int dir, // 0 sets first parameter's domain, 1 gets second parameter's domain
195 double t0,
196 double t1
197 );
198
199 virtual
201 int dir // 0 gets first parameter's domain, 1 gets second parameter's domain
202 ) const = 0;
203
204 /*
205 Description:
206 Get an estimate of the size of the rectangle that would
207 be created if the 3d surface where flattened into a rectangle.
208 Parameters:
209 width - [out] (corresponds to the first surface parameter)
210 height - [out] (corresponds to the first surface parameter)
211 Example:
212
213 // Reparameterize a surface to minimize distortion
214 // in the map from parameter space to 3d.
215 ON_Surface* surf = ...;
216 double width, height;
217 if ( surf->GetSurfaceSize( &width, &height ) )
218 {
219 srf->SetDomain( 0, ON_Interval( 0.0, width ) );
220 srf->SetDomain( 1, ON_Interval( 0.0, height ) );
221 }
222
223 Returns:
224 true if successful.
225 */
226 virtual
227 ON_BOOL32 GetSurfaceSize(
228 double* width,
229 double* height
230 ) const;
231
232
233 virtual
235 int dir // 0 gets first parameter's domain, 1 gets second parameter's domain
236 ) const = 0; // number of smooth nonempty spans in the parameter direction
237
238 virtual
239 ON_BOOL32 GetSpanVector( // span "knots"
240 int dir, // 0 gets first parameter's domain, 1 gets second parameter's domain
241 double* span_vector // array of length SpanCount() + 1
242 ) const = 0; //
243
245 // If t is in the domain of the surface, GetSpanVectorIndex() returns the
246 // span vector index "i" such that span_vector[i] <= t <= span_vector[i+1].
247 // The "side" parameter determines which span is selected when t is at the
248 // end of a span.
249 virtual
250 ON_BOOL32 GetSpanVectorIndex(
251 int dir , // 0 gets first parameter's domain, 1 gets second parameter's domain
252 double t, // [IN] t = evaluation parameter
253 int side, // [IN] side 0 = default, -1 = from below, +1 = from above
254 int* span_vector_index, // [OUT] span vector index
255 ON_Interval* span_interval // [OUT] domain of the span containing "t"
256 ) const;
257
258 virtual
259 int Degree( // returns maximum algebraic degree of any span
260 // ( or a good estimate if curve spans are not algebraic )
261 int dir // 0 gets first parameter's domain, 1 gets second parameter's domain
262 ) const = 0;
263
264 virtual ON_BOOL32 GetParameterTolerance( // returns tminus < tplus: parameters tminus <= s <= tplus
265 int dir, // 0 gets first parameter, 1 gets second parameter
266 double t, // t = parameter in domain
267 double* tminus, // tminus
268 double* tplus // tplus
269 ) const;
270
271 /*
272 Description:
273 Test a 2d curve to see if it is iso parameteric in the surface's
274 parameter space.
275 Parameters:
276 curve - [in] curve to test
277 curve_domain = [in] optional sub domain of the curve
278 Returns:
279 Isoparametric status of the curve.
280 Remarks:
281 Because it may transpose domains, ON_SurfaceProxy overrides
282 this function. All other surface classes just use
283 the base class implementation.
284 */
285 virtual
286 ISO IsIsoparametric(
287 const ON_Curve& curve,
288 const ON_Interval* curve_domain = NULL
289 ) const;
290
291 /*
292 Description:
293 Test a 2d bounding box to see if it is iso parameteric in the surface's
294 parameter space.
295 Parameters:
296 bbox - [in] bounding box to test
297 Returns:
298 Isoparametric status of the bounding box.
299 Remarks:
300 Because it may transpose domains, ON_SurfaceProxy overrides
301 this function. All other surface classes just use
302 the base class implementation.
303 */
304 virtual
305 ISO IsIsoparametric(
306 const ON_BoundingBox& bbox
307 ) const;
308
309 /*
310 Description:
311 Test a surface to see if it is planar.
312 Parameters:
313 plane - [out] if not NULL and true is returned,
314 the plane parameters are filled in.
315 tolerance - [in] tolerance to use when checking
316 Returns:
317 true if there is a plane such that the maximum distance from
318 the surface to the plane is <= tolerance.
319 */
320 virtual
321 ON_BOOL32 IsPlanar(
322 ON_Plane* plane = NULL,
323 double tolerance = ON_ZERO_TOLERANCE
324 ) const;
325
326 /*
327 Description:
328 Determine if the surface is a portion of a sphere.
329 Parameters:
330 sphere - [out] if not NULL and true is returned,
331 then the sphere definition is returned.
332 tolerance - [in]
333 tolerance to use when checking
334 Returns:
335 True if the surface is a portion of a sphere.
336 */
337 bool IsSphere(
338 ON_Sphere* sphere = NULL,
339 double tolerance = ON_ZERO_TOLERANCE
340 ) const;
341
342 /*
343 Description:
344 Determine if the surface is a portion of a cylinder.
345 Parameters:
346 cylinder - [out] if not NULL and true is returned,
347 then the cylinder definition is returned.
348 tolerance - [in]
349 tolerance to use when checking
350 Returns:
351 True if the surface is a portion of a cylinder.
352 */
353 bool IsCylinder(
354 ON_Cylinder* cylinder = NULL,
355 double tolerance = ON_ZERO_TOLERANCE
356 ) const;
357
358 /*
359 Description:
360 Determine if the surface is a portion of a cone.
361 Parameters:
362 cone - [out] if not NULL and true is returned,
363 then the cone definition is returned.
364 tolerance - [in]
365 tolerance to use when checking
366 Returns:
367 True if the surface is a portion of a cone.
368 */
369 bool IsCone(
370 ON_Cone* cone = NULL,
371 double tolerance = ON_ZERO_TOLERANCE
372 ) const;
373
374 /*
375 Description:
376 Determine if the surface is a portion of a torus.
377 Parameters:
378 torus - [out] if not NULL and true is returned,
379 then the torus definition is returned.
380 tolerance - [in]
381 tolerance to use when checking
382 Returns:
383 True if the surface is a portion of a torus.
384 */
385 bool IsTorus(
386 ON_Torus* torus = NULL,
387 double tolerance = ON_ZERO_TOLERANCE
388 ) const;
389
390 virtual
391 ON_BOOL32 IsClosed( // true if surface is closed in direction
392 int // dir 0 = "s", 1 = "t"
393 ) const;
394
395 virtual
396 ON_BOOL32 IsPeriodic( // true if surface is periodic in direction (default is false)
397 int // dir 0 = "s", 1 = "t"
398 ) const;
399
400 virtual
401 ON_BOOL32 IsSingular( // true if surface side is collapsed to a point
402 int // side of parameter space to test
403 // 0 = south, 1 = east, 2 = north, 3 = west
404 ) const;
405
406 /*
407 Returns:
408 True if the surface defines a solid, like a sphere or torus.
409 False if the surface does not define a solid, like a plane or cone.
410 */
411 bool IsSolid() const;
412
413 /*
414 Description:
415 Test if a surface parameter value is at a singularity.
416 Parameters:
417 s - [in] surface parameter to test
418 t - [in] surface parameter to test
419 bExact - [in] if true, test if s,t is exactly at a singularity
420 if false, test if close enough to cause numerical problems.
421 Returns:
422 true if surface is singular at (s,t)
423 */
424 bool IsAtSingularity(
425 double s,
426 double t,
427 bool bExact = true
428 ) const;
429
430 /*
431 Description:
432 Test if a surface parameter value is at a seam.
433 Parameters:
434 s - [in] surface parameter to test
435 t - [in] surface parameter to test
436 Returns:
437 0 if not a seam,
438 1 if s == Domain(0)[i] and srf(s, t) == srf(Domain(0)[1-i], t)
439 2 if t == Domain(1)[i] and srf(s, t) == srf(s, Domain(1)[1-i])
440 3 if 1 and 2 are true.
441 */
442 int IsAtSeam(
443 double s,
444 double t
445 ) const;
446
447 /*
448 Description:
449 Search for a derivatitive, tangent, or curvature
450 discontinuity.
451 Parameters:
452 dir - [in] If 0, then "u" parameter is checked. If 1, then
453 the "v" parameter is checked.
454 c - [in] type of continity to test for.
455 t0 - [in] Search begins at t0. If there is a discontinuity
456 at t0, it will be ignored. This makes it
457 possible to repeatedly call GetNextDiscontinuity
458 and step through the discontinuities.
459 t1 - [in] (t0 != t1) If there is a discontinuity at t1 is
460 will be ingored unless c is a locus discontinuity
461 type and t1 is at the start or end of the curve.
462 t - [out] if a discontinuity is found, then *t reports the
463 parameter at the discontinuity.
464 hint - [in/out] if GetNextDiscontinuity will be called
465 repeatedly, passing a "hint" with initial value *hint=0
466 will increase the speed of the search.
467 dtype - [out] if not NULL, *dtype reports the kind of
468 discontinuity found at *t. A value of 1 means the first
469 derivative or unit tangent was discontinuous. A value
470 of 2 means the second derivative or curvature was
471 discontinuous. A value of 0 means teh curve is not
472 closed, a locus discontinuity test was applied, and
473 t1 is at the start of end of the curve.
474 cos_angle_tolerance - [in] default = cos(1 degree) Used only
475 when c is ON::G1_continuous or ON::G2_continuous. If the
476 cosine of the angle between two tangent vectors is
477 <= cos_angle_tolerance, then a G1 discontinuity is reported.
478 curvature_tolerance - [in] (default = ON_SQRT_EPSILON) Used
479 only when c is ON::G2_continuous. If K0 and K1 are
480 curvatures evaluated from above and below and
481 |K0 - K1| > curvature_tolerance, then a curvature
482 discontinuity is reported.
483 Returns:
484 Parametric continuity tests c = (C0_continuous, ..., G2_continuous):
485
486 true if a parametric discontinuity was found strictly
487 between t0 and t1. Note well that all curves are
488 parametrically continuous at the ends of their domains.
489
490 Locus continuity tests c = (C0_locus_continuous, ...,G2_locus_continuous):
491
492 true if a locus discontinuity was found strictly between
493 t0 and t1 or at t1 is the at the end of a curve.
494 Note well that all open curves (IsClosed()=false) are locus
495 discontinuous at the ends of their domains. All closed
496 curves (IsClosed()=true) are at least C0_locus_continuous at
497 the ends of their domains.
498 */
499 virtual
500 bool GetNextDiscontinuity(
501 int dir,
502 ON::continuity c,
503 double t0,
504 double t1,
505 double* t,
506 int* hint=NULL,
507 int* dtype=NULL,
508 double cos_angle_tolerance=0.99984769515639123915701155881391,
509 double curvature_tolerance=ON_SQRT_EPSILON
510 ) const;
511
512 /*
513 Description:
514 Test continuity at a surface parameter value.
515 Parameters:
516 c - [in] continuity to test for
517 s - [in] surface parameter to test
518 t - [in] surface parameter to test
519 hint - [in] evaluation hint
520 point_tolerance - [in] if the distance between two points is
521 greater than point_tolerance, then the surface is not C0.
522 d1_tolerance - [in] if the difference between two first derivatives is
523 greater than d1_tolerance, then the surface is not C1.
524 d2_tolerance - [in] if the difference between two second derivatives is
525 greater than d2_tolerance, then the surface is not C2.
526 cos_angle_tolerance - [in] default = cos(1 degree) Used only when
527 c is ON::G1_continuous or ON::G2_continuous. If the cosine
528 of the angle between two normal vectors
529 is <= cos_angle_tolerance, then a G1 discontinuity is reported.
530 curvature_tolerance - [in] (default = ON_SQRT_EPSILON) Used only when
531 c is ON::G2_continuous. If K0 and K1 are curvatures evaluated
532 from above and below and |K0 - K1| > curvature_tolerance,
533 then a curvature discontinuity is reported.
534 Returns:
535 true if the surface has at least the c type continuity at the parameter t.
536 */
537 virtual
538 bool IsContinuous(
539 ON::continuity c,
540 double s,
541 double t,
542 int* hint = NULL,
543 double point_tolerance=ON_ZERO_TOLERANCE,
544 double d1_tolerance=ON_ZERO_TOLERANCE,
545 double d2_tolerance=ON_ZERO_TOLERANCE,
546 double cos_angle_tolerance=0.99984769515639123915701155881391,
547 double curvature_tolerance=ON_SQRT_EPSILON
548 ) const;
549
550 virtual
551 ON_BOOL32 Reverse( // reverse parameterizatrion, Domain changes from [a,b] to [-b,-a]
552 int // dir 0 = "s", 1 = "t"
553 ) = 0;
554
555 virtual
556 ON_BOOL32 Transpose() = 0; // transpose surface parameterization (swap "s" and "t")
557
558 // simple evaluation interface - no error handling
559 ON_3dPoint PointAt( double, double ) const;
560 ON_3dVector NormalAt( double, double ) const;
561 ON_BOOL32 FrameAt( double u, double v, ON_Plane& frame) const;
562
563 ON_BOOL32 EvPoint( // returns false if unable to evaluate
564 double u, double v, // evaluation parameters
565 ON_3dPoint& point, // returns value of surface
566 int quadrant = 0, // optional - determines which side to evaluate from
567 // 0 = default
568 // 1 from NE quadrant
569 // 2 from NW quadrant
570 // 3 from SW quadrant
571 // 4 from SE quadrant
572 int* hint = 0 // optional - evaluation hint (int[2]) used to speed
573 // repeated evaluations
574 ) const;
575
576 ON_BOOL32 Ev1Der( // returns false if unable to evaluate
577 double u, double v, // evaluation parameters (s,t)
578 ON_3dPoint& point, // returns value of surface
579 ON_3dVector& du, // first partial derivatives (Ds)
580 ON_3dVector& dv, // (Dt)
581 int quadrant = 0, // optional - determines which side to evaluate from
582 // 0 = default
583 // 1 from NE quadrant
584 // 2 from NW quadrant
585 // 3 from SW quadrant
586 // 4 from SE quadrant
587 int* hint = 0 // optional - evaluation hint (int[2]) used to speed
588 // repeated evaluations
589 ) const;
590
591 ON_BOOL32 Ev2Der( // returns false if unable to evaluate
592 double u, double v, // evaluation parameters (s,t)
593 ON_3dPoint& point, // returns value of surface
594 ON_3dVector& du, // first partial derivatives (Ds)
595 ON_3dVector& dv, // (Dt)
596 ON_3dVector& duu, // second partial derivatives (Dss)
597 ON_3dVector& duv, // (Dst)
598 ON_3dVector& dvv, // (Dtt)
599 int quadrant= 0, // optional - determines which side to evaluate from
600 // 0 = default
601 // 1 from NE quadrant
602 // 2 from NW quadrant
603 // 3 from SW quadrant
604 // 4 from SE quadrant
605 int* hint = 0 // optional - evaluation hint (int[2]) used to speed
606 // repeated evaluations
607 ) const;
608
609 ON_BOOL32 EvNormal( // returns false if unable to evaluate
610 double u, double v, // evaluation parameters (s,t)
611 ON_3dPoint& point, // returns value of surface
612 ON_3dVector& normal, // unit normal
613 int quadrant = 0, // optional - determines which side to evaluate from
614 // 0 = default
615 // 1 from NE quadrant
616 // 2 from NW quadrant
617 // 3 from SW quadrant
618 // 4 from SE quadrant
619 int* hint = 0 // optional - evaluation hint (int[2]) used to speed
620 // repeated evaluations
621 ) const;
622
623 ON_BOOL32 EvNormal( // returns false if unable to evaluate
624 double u, double v, // evaluation parameters (s,t)
625 ON_3dVector& normal, // unit normal
626 int quadrant = 0, // optional - determines which side to evaluate from
627 // 0 = default
628 // 1 from NE quadrant
629 // 2 from NW quadrant
630 // 3 from SW quadrant
631 // 4 from SE quadrant
632 int* hint = 0 // optional - evaluation hint (int[2]) used to speed
633 // repeated evaluations
634 ) const;
635
636 ON_BOOL32 EvNormal( // returns false if unable to evaluate
637 double u, double v, // evaluation parameters (s,t)
638 ON_3dPoint& point, // returns value of surface
639 ON_3dVector& du, // first partial derivatives (Ds)
640 ON_3dVector& dv, // (Dt)
641 ON_3dVector& normal, // unit normal
642 int = 0, // optional - determines which side to evaluate from
643 // 0 = default
644 // 1 from NE quadrant
645 // 2 from NW quadrant
646 // 3 from SW quadrant
647 // 4 from SE quadrant
648 int* = 0 // optional - evaluation hint (int[2]) used to speed
649 // repeated evaluations
650 ) const;
651
652 // work horse evaluator
653 virtual
654 ON_BOOL32 Evaluate( // returns false if unable to evaluate
655 double u, double v, // evaluation parameters
656 int num_der, // number of derivatives (>=0)
657 int array_stride, // array stride (>=Dimension())
658 double* der_array, // array of length stride*(ndir+1)*(ndir+2)/2
659 int quadrant = 0, // optional - determines which quadrant to evaluate from
660 // 0 = default
661 // 1 from NE quadrant
662 // 2 from NW quadrant
663 // 3 from SW quadrant
664 // 4 from SE quadrant
665 int* hint = 0 // optional - evaluation hint (int[2]) used to speed
666 // repeated evaluations
667 ) const = 0;
668
669 /*
670 Description:
671 Get isoparametric curve.
672 Parameters:
673 dir - [in] 0 first parameter varies and second parameter is constant
674 e.g., point on IsoCurve(0,c) at t is srf(t,c)
675 This is a horizontal line from left to right
676 1 first parameter is constant and second parameter varies
677 e.g., point on IsoCurve(1,c) at t is srf(c,t
678 This is a vertical line from bottom to top
679
680 c - [in] value of constant parameter
681 Returns:
682 Isoparametric curve.
683 Remarks:
684 In this function "dir" indicates which direction the resulting
685 curve runs. 0: horizontal, 1: vertical
686 In the other ON_Surface functions that take a "dir"
687 argument, "dir" indicates if "c" is a "u" or "v" parameter.
688 */
689 virtual
690 ON_Curve* IsoCurve(
691 int dir,
692 double c
693 ) const;
694
695 /*
696 Description:
697 Compute a 3d curve that is the composite of a 2d curve
698 and the surface map.
699 Parameters:
700 curve_2d - [in] a 2d curve whose image is in the surface's domain.
701 tolerance - [in] the maximum acceptable distance from the returned
702 3d curve to the image of curve_2d on the surface.
703 curve_2d_subdomain - [in] optional subdomain for curve_2d
704 Returns:
705 3d curve.
706 See Also:
707 ON_Surface::IsoCurve
708 ON_Surface::Pullback
709 */
710 virtual
711 ON_Curve* Pushup( const ON_Curve& curve_2d,
712 double tolerance,
713 const ON_Interval* curve_2d_subdomain = NULL
714 ) const;
715
716 /*
717 Description:
718 Pull a 3d curve back to the surface's parameter space.
719 Parameters:
720 curve_3d - [in] a 3d curve
721 tolerance - [in] the maximum acceptable 3d distance between
722 from surface(curve_2d(t)) to the locus of points on the
723 surface that are closest to curve_3d.
724 curve_3d_subdomain - [in] optional subdomain for curve_3d
725 start_uv - [in] optional starting point (if known)
726 end_uv - [in] optional ending point (if known)
727 Returns:
728 2d curve.
729 See Also:
730 ON_Surface::IsoCurve
731 ON_Surface::Pushup
732 */
733 virtual
734 ON_Curve* Pullback( const ON_Curve& curve_3d,
735 double tolerance,
736 const ON_Interval* curve_3d_subdomain = NULL,
737 ON_3dPoint start_uv = ON_UNSET_POINT,
739 ) const;
740
741 /*
742 Description:
743 Removes the portions of the surface outside of the specified interval.
744
745 Parameters:
746 dir - [in] 0 The domain specifies an sub-interval of Domain(0)
747 (the first surface parameter).
748 1 The domain specifies an sub-interval of Domain(1)
749 (the second surface parameter).
750 domain - [in] interval of the surface to keep. If dir is 0, then
751 the portions of the surface with parameters (s,t) satisfying
752 s < Domain(0).Min() or s > Domain(0).Max() are trimmed away.
753 If dir is 1, then the portions of the surface with parameters
754 (s,t) satisfying t < Domain(1).Min() or t > Domain(1).Max()
755 are trimmed away.
756 */
757 virtual
759 int dir,
760 const ON_Interval& domain
761 );
762
763 /*
764 Description:
765 Pure virtual function. Default returns false.
766 Where possible, analytically extends surface to include domain.
767 Parameters:
768 dir - [in] 0 new Domain(0) will include domain.
769 (the first surface parameter).
770 1 new Domain(1) will include domain.
771 (the second surface parameter).
772 domain - [in] if domain is not included in surface domain,
773 surface will be extended so that its domain includes domain.
774 Will not work if surface is closed in direction dir.
775 Original surface is identical to the restriction of the
776 resulting surface to the original surface domain,
777 Returns:
778 true if successful.
779 */
780 virtual
781 bool Extend(
782 int dir,
783 const ON_Interval& domain
784 );
785
786
787 /*
788 Description:
789 Splits (divides) the surface into two parts at the
790 specified parameter.
791
792 Parameters:
793 dir - [in] 0 The surface is split vertically. The "west" side
794 is returned in "west_or_south_side" and the "east"
795 side is returned in "east_or_north_side".
796 1 The surface is split horizontally. The "south" side
797 is returned in "west_or_south_side" and the "north"
798 side is returned in "east_or_north_side".
799 c - [in] value of constant parameter in interval returned
800 by Domain(dir)
801 west_or_south_side - [out] west/south portion of surface returned here
802 east_or_north_side - [out] east/north portion of surface returned here
803
804 Example:
805
806 ON_NurbsSurface srf = ...;
807 int dir = 1;
808 ON_NurbsSurface* south_side = 0;
809 ON_NurbsSurface* north_side = 0;
810 srf.Split( dir, srf.Domain(dir).Mid() south_side, north_side );
811
812 */
813 virtual
814 ON_BOOL32 Split(
815 int dir,
816 double c,
817 ON_Surface*& west_or_south_side,
818 ON_Surface*& east_or_north_side
819 ) const;
820
821 /*
822 Description:
823 Get the parameters of the point on the surface that is closest to P.
824 Parameters:
825 P - [in]
826 test point
827 s - [out]
828 t - [out]
829 (*s,*t) = parameters of the surface point that
830 is closest to P.
831 maximum_distance = 0.0 - [in]
832 optional upper bound on the distance from P to
833 the surface. If you are only interested in
834 finding a point Q on the surface when
835 P.DistanceTo(Q) < maximum_distance, then set
836 maximum_distance to that value.
837 sdomain = 0 - [in] optional domain restriction
838 tdomain = 0 - [in] optional domain restriction
839 Returns:
840 True if successful. If false, the values of *s and *t
841 are undefined.
842 See Also:
843 ON_Surface::GetLocalClosestPoint.
844 */
845 virtual
846 bool GetClosestPoint(
847 const ON_3dPoint& P,
848 double* s,
849 double* t,
850 double maximum_distance = 0.0,
851 const ON_Interval* sdomain = 0,
852 const ON_Interval* tdomain = 0
853 ) const;
854
856 // Find parameters of the point on a surface that is locally closest to
857 // the test_point. The search for a local close point starts at
858 // seed parameters. If a sub_domain parameter is not NULL, then
859 // the search is restricted to the specified portion of the surface.
860 //
861 // true if returned if the search is successful. false is returned if
862 // the search fails.
863 virtual
864 ON_BOOL32 GetLocalClosestPoint( const ON_3dPoint&, // test_point
865 double,double, // seed_parameters
866 double*,double*, // parameters of local closest point returned here
867 const ON_Interval* = NULL, // first parameter sub_domain
868 const ON_Interval* = NULL // second parameter sub_domain
869 ) const;
870
871
872 /*
873 Description:
874 Offset surface.
875 Parameters:
876 offset_distance - [in] offset distance
877 tolerance - [in] Some surfaces do not have an exact offset that
878 can be represented using the same class of surface definition.
879 In that case, the tolerance specifies the desired accuracy.
880 max_deviation - [out] If this parameter is not NULL, the maximum
881 deviation from the returned offset to the true offset is returned
882 here. This deviation is zero except for cases where an exact
883 offset cannot be computed using the same class of surface definition.
884 Returns:
885 Offset surface.
886 */
887 virtual
889 double offset_distance,
890 double tolerance,
891 double* max_deviation = NULL
892 ) const;
893
894
895 /*
896 Description:
897 Get a NURBS surface representation of this surface.
898 Parameters:
899 nurbs_surface - [out] NURBS representation returned here
900 tolerance - [in] tolerance to use when creating NURBS
901 representation.
902 s_subdomain - [in] if not NULL, then the NURBS representation
903 for this portion of the surface is returned.
904 t_subdomain - [in] if not NULL, then the NURBS representation
905 for this portion of the surface is returned.
906 Returns:
907 0 unable to create NURBS representation
908 with desired accuracy.
909 1 success - returned NURBS parameterization
910 matches the surface's to wthe desired accuracy
911 2 success - returned NURBS point locus matches
912 the surface's to the desired accuracy and the
913 domain of the NURBS surface is correct. On
914 However, This surface's parameterization and
915 the NURBS surface parameterization may not
916 match to the desired accuracy. This situation
917 happens when getting NURBS representations of
918 surfaces that have a transendental parameterization
919 like spheres, cylinders, and cones.
920 Remarks:
921 This is a low-level virtual function. If you do not need
922 the parameterization information provided by the return code,
923 then ON_Surface::NurbsSurface may be easier to use.
924 See Also:
925 ON_Surface::NurbsSurface
926 */
927 virtual
928 int GetNurbForm(
929 ON_NurbsSurface& nurbs_surface,
930 double tolerance = 0.0
931 ) const;
932
933
934 /*
935 Description:
936 Is there a NURBS surface representation of this surface.
937 Parameters:
938 Returns:
939 0 unable to create NURBS representation
940 with desired accuracy.
941 1 success - NURBS parameterization
942 matches the surface's
943 2 success - NURBS point locus matches
944 the surface's and the
945 domain of the NURBS surface is correct.
946 However, This surface's parameterization and
947 the NURBS surface parameterization may not
948 match. This situation
949 happens when getting NURBS representations of
950 surfaces that have a transendental parameterization
951 like spheres, cylinders, and cones.
952 Remarks:
953 This is a low-level virtual function.
954 See Also:
955 ON_Surface::GetNurbForm
956 ON_Surface::NurbsSurface
957 */
958 virtual
959 int HasNurbForm() const;
960
961 // Description:
962 // Get a NURBS surface representation of this surface.
963 // Parameters:
964 // pNurbsSurface - [in/out] if not NULL, this pNurbsSurface
965 // will be used to store the NURBS representation
966 // of the surface and will be returned.
967 // tolerance - [in] tolerance to use when creating NURBS
968 // surface representation.
969 // s_subdomain - [in] if not NULL, then the NURBS representation
970 // for this portion of the surface is returned.
971 // t_subdomain - [in] if not NULL, then the NURBS representation
972 // for this portion of the surface is returned.
973 // Returns:
974 // NULL or a NURBS representation of the surface.
975 // Remarks:
976 // See ON_Surface::GetNurbForm for important details about
977 // the NURBS surface parameterization.
978 // See Also:
979 // ON_Surface::GetNurbForm
980 ON_NurbsSurface* NurbsSurface(
981 ON_NurbsSurface* pNurbsSurface = NULL,
982 double tolerance = 0.0,
983 const ON_Interval* s_subdomain = NULL,
984 const ON_Interval* t_subdomain = NULL
985 ) const;
986
987 virtual
988 bool GetSurfaceParameterFromNurbFormParameter(
989 double nurbs_s, double nurbs_t,
990 double* surface_s, double* surface_t
991 ) const;
992
993 virtual
994 bool GetNurbFormParameterFromSurfaceParameter(
995 double surface_s, double surface_t,
996 double* nurbs_s, double* nurbs_t
997 ) const;
998
999
1000 // If the geometry surface is modified in any way, then
1001 // call DestroySurfaceTree().
1002 void DestroySurfaceTree();
1003
1004 const ON_SurfaceTree* SurfaceTree() const;
1005
1006 virtual
1007 ON_SurfaceTree* CreateSurfaceTree() const;
1008
1009 /*
1010 Description:
1011 Calculate area mass properties of the surface.
1012 Parameters:
1013 mp - [out]
1014 bArea - [in] true to calculate area
1015 bFirstMoments - [in] true to calculate area first moments,
1016 area and area centroid.
1017 bSecondMoments - [in] true to calculate area second moments.
1018 bProductMoments - [in] true to calculate area product moments.
1019 Returns:
1020 True if successful.
1021 */
1022 bool AreaMassProperties(
1024 bool bArea = true,
1025 bool bFirstMoments = true,
1026 bool bSecondMoments = true,
1027 bool bProductMoments = true,
1028 double rel_tol = 1.0e-6,
1029 double abs_tol = 1.0e-6
1030 ) const;
1031
1032 /*
1033 Description:
1034 Calculate volume mass properties of the surface.
1035 Parameters:
1036 mp - [out]
1037 bVolume - [in] true to calculate volume
1038 bFirstMoments - [in] true to calculate volume first moments,
1039 volume, and volume centroid.
1040 bSecondMoments - [in] true to calculate volume second moments.
1041 bProductMoments - [in] true to calculate volume product moments.
1042 base_point - [in]
1043 If the surface is closed, then pass ON_UNSET_VALUE.
1044
1045 This parameter is for expert users who are computing a
1046 volume whose boundary is defined by several non-closed
1047 breps, surfaces, and meshes.
1048
1049 When computing the volume, volume centroid, or volume
1050 first moments of a volume whose boundary is defined by
1051 several breps, surfaces, and meshes, pass the same
1052 base_point to each call to VolumeMassProperties.
1053
1054 When computing the volume second moments or volume product
1055 moments of a volume whose boundary is defined by several
1056 breps, surfaces, and meshes, you MUST pass the entire
1057 volume's centroid as the base_point and the input mp
1058 parameter must contain the results of a previous call
1059 to VolumeMassProperties(mp,true,true,false,false,base_point).
1060 In particular, in this case, you need to make two sets of
1061 calls; use first set to calculate the volume centroid and
1062 the second set calculate the second moments and product
1063 moments.
1064 Returns:
1065 True if successful.
1066 */
1067 bool VolumeMassProperties(
1068 ON_MassProperties& mp,
1069 bool bVolume = true,
1070 bool bFirstMoments = true,
1071 bool bSecondMoments = true,
1072 bool bProductMoments = true,
1073 ON_3dPoint base_point = ON_UNSET_POINT,
1074 double rel_tol = 1.0e-6,
1075 double abs_tol = 1.0e-6
1076 ) const;
1077
1078 /*
1079 Description:
1080 Intersect this surface with surfaceB.
1081
1082 Parameters:
1083 surfaceB - [in]
1084
1085 x - [out]
1086 Intersection events are appended to this array.
1087
1088 intersection_tolerance - [in]
1089 If the input intersection_tolerance <= 0.0, then 0.001 is used.
1090
1091 overlap_tolerance - [in]
1092 If positive, then overlap_tolerance must be
1093 >= intersection_tolerance and is used to test for
1094 overlapping regions. If the input
1095 overlap_tolerance <= 0.0, then 2*intersection_tolerance
1096 is used.
1097
1098 fitting_tolerance - [in]
1099 If fitting_tolerance is > 0 and >= intersection_tolerance,
1100 then the intersection curves are fit to this tolerance.
1101 If input fitting_tolerance <= 0.0 or < intersection_tolerance,
1102 then intersection_tolerance is used.
1103
1104 surfaceA_udomain - [in]
1105 optional restriction on surfaceA u domain
1106 surfaceA_vdomain - [in]
1107 optional restriction on surfaceA v domain
1108
1109 surfaceB_udomain - [in]
1110 optional restriction on surfaceB u domain
1111 surfaceB_vdomain - [in]
1112 optional restriction on surfaceB v domain
1113 Returns:
1114 Number of intersection events appended to x.
1115 */
1116 int IntersectSurface(
1117 const ON_Surface* surfaceB,
1119 double intersection_tolerance = 0.0,
1120 double overlap_tolerance = 0.0,
1121 double fitting_tolerance = 0.0,
1122 const ON_Interval* surfaceA_udomain = 0,
1123 const ON_Interval* surfaceA_vdomain = 0,
1124 const ON_Interval* surfaceB_udomain = 0,
1125 const ON_Interval* surfaceB_vdomain = 0
1126 ) const;
1127
1128 /*
1129 Description:
1130 Create a cubic nurbs surface that interpolates a list of curves.
1131
1132 Parameters:
1133 curve_count - [in] >= 2
1134 number of curves
1135
1136 curve_list - [in]
1137 array of pointers to curves. These curves define
1138 the location of the The returned surface's "v" parameter
1139
1140 k - [in] (0.0 <= k) or k = ON_UNSET_VALUE
1141 k determines how the surface's m_knot[0] values
1142 are calculated. Most frequently, 0.0, 0.5, or 1.0 should be used.
1143 0.0: uniform
1144 0.5: sqrt(chord length)
1145 1.0: chord length
1146 In general, when k >= 0.0, then spacing is pow(d,k), where d is the
1147 average distance between the curves defining the span.
1148 ON_UNSET_VALUE: the intepolation knot vector is explicity specified.
1149 The knots in the interpolated direction are specified. You must
1150 understand the mathematics of NURBS surfaces to use this option.
1151 To specify an explicit knot vector for the interpolation, the
1152 nurbs_suface parameter must be non-null, and nurbs_surface->m_knot[0]
1153 must be an array of length 4+curve_count, and
1154 (nurbs_surface->m_knot[0][2], ..., nurbs_surface->m_knot[0][curve_count+1])
1155 must be a strictly increasing list of values.
1156
1157 is_closed - [in]
1158 0: open
1159 1: closed
1160 2: periodic
1161
1162 start_shape - [in]
1163 end_shape - [in]
1164 The start_shape and end_shape paramters determine the
1165 starting and ending shape of the lofted surface.
1166 Simple shapes:
1167 The simple end conditions calculate the rows of free
1168 control points based on the locations of the input
1169 curves and do not require additional input information.
1170 ON::cubic_loft_ec_quadratic: quadratic
1171 ON::cubic_loft_ec_linear: linear
1172 ON::cubic_loft_ec_cubic: cubic
1173 ON::cubic_loft_ec_natural: natrual (zero 2nd derivative)
1174 Explicit shapes:
1175 In order to specify explicit end conditions, curve_count must
1176 be at least 3, is_closed must be 0 or 1, the nurbs_surface
1177 parameter must be non-null, the nurbs_surface control
1178 points must be allocated, nurbs_surface->m_cv_count[0]
1179 must be curve_count+2, and the input curves must have nurbs
1180 curve formats with the same number of control points as
1181 nurbs_surface->m_cv_count[1]. The values of the starting
1182 shape points are specified in nurbs_surface->CV(1,...) and
1183 the values of ending shape points are specified in
1184 nurbs_surface->CV(curve_count,...).
1185 N = curve_count
1186 ON::cubic_loft_ec_unit_tangent: unit tangent is specified
1187 ON::cubic_loft_ec_1st_derivative: first derivative is specified
1188 ON::cubic_loft_ec_2nd_derivative: second derivative is specified
1189 ON::cubic_loft_ec_free_cv: free control vertex is specified
1190
1191 nurbs_surface - [in]
1192 If not null, the result will returned in this ON_NurbsSurface.
1193 Typically, this paramter is used when you want to store the
1194 result in an ON_NurbsSurface that is on the stack. This
1195 paramter is also used when you want to specify the interpolation
1196 knots or end conditions.
1197
1198 Returns:
1199 If successful, a pointer to the surface is returned. If the input
1200 nurbs_surface parameter was null, then this surface is on the heap
1201 and will need to be deleted to avoid memory leaks. If the input
1202 is not valid, null is returned, even when nurbs_surface is not
1203 null.
1204
1205 Example:
1206
1207 // EXAMPLE 1: Loft a surface through a list of curves
1208 ON_SimpleArray< const ON_Curve* > curve_list = ....;
1209 ON_NurbsSurface* srf = ON_Surface::CreateCubicLoft(
1210 curve_list.Count(),
1211 curve_list,
1212 0.5 // sqrt(chord length) spacing
1213 );
1214
1215 // EXAMPLE 2: Create adjacent surfaces with an identical shared edge.
1216 // First make two curve lists with
1217 // curve_listA.Count() == curve_listB.Count() and
1218 // curve_listA[i]->PointAtEnd() == curve_listB[i]->PointAtStart()
1219 ON_SimpleArray< const ON_Curve* > curve_listA = ....;
1220 ON_SimpleArray< const ON_Curve* > curve_listB = ....;
1221 curve_count = curve_listA.Count();
1222 ON_NurbsSurface* srfA = 0;
1223 ON_NurbsSurface* srfB = 0;
1224 if ( curve_count == curve_listB.Count() )
1225 {
1226 srfA = ON_Surface::CreateCubicLoft(
1227 curve_count,
1228 curve_listA.Array(),
1229 1.0 // chord length spacing
1230 );
1231 if (0 != srfA)
1232 {
1233 srfB = new ON_NurbsSurface();
1234 int knot_count0 = srfA->KnotCount(0);
1235 srfB->ReserveKnotCapacity(0,knot_count0);
1236 memcpy(srfB->m_knot[0],srfA->m_knot[0],knot_count0*sizeof(srfB->m_knot[0][0]))
1237 if ( 0 == ON_Surface::CreateCubicLoft(
1238 curve_count,
1239 curve_listB.Array(),
1240 ON_UNSET_VALUE, // knots specified in srfB->m_knot[0]
1241 0, // open loft
1242 ON::cubic_loft_ec_quadratic,
1243 ON::cubic_loft_ec_quadratic,
1244 srfB
1245 ) )
1246 {
1247 // clean up to prevent memory leaks
1248 delete srfB;
1249 srfB = 0;
1250 }
1251 }
1252 }
1253 */
1254 static
1255 class ON_NurbsSurface* CreateCubicLoft(
1256 int curve_count,
1257 const ON_Curve* const* curve_list,
1258 double k,
1259 int is_closed = 0,
1260 ON::cubic_loft_end_condition start_shape = ON::cubic_loft_ec_quadratic,
1261 ON::cubic_loft_end_condition end_shape = ON::cubic_loft_ec_quadratic,
1262 class ON_NurbsSurface* nurbs_surface = 0
1263 );
1264
1265protected:
1266 // Runtime only - ignored by Read()/Write()
1267 ON_SurfaceTree* m_stree;
1268
1269protected:
1270 // Helper for ON_Surface::Pullback overrides that does a segment-by-segment
1271 // pullback.
1272 ON_Curve* PullbackPolyCurve(
1273 const ON_PolyCurve& polycurve_3d,
1274 double tolerance,
1275 const ON_Interval* curve_3d_subdomain,
1276 ON_3dPoint start_uv,
1277 ON_3dPoint end_uv
1278 ) const;
1279
1280 // Helper for ON_Surface::Pushup overrides that does a segment-by-segment
1281 // pushup.
1282 ON_Curve* PushupPolyCurve( const ON_PolyCurve& polycurve_2d,
1283 double tolerance,
1284 const ON_Interval* curve_2d_subdomain
1285 ) const;
1286
1287
1288 // Helper for ON_Surface::Pullback overrides that handles "real" curve issues.
1289 ON_Curve* PullbackCurveProxy(
1290 const ON_CurveProxy& curveproxy_3d,
1291 double tolerance,
1292 const ON_Interval* curve_3d_subdomain,
1293 ON_3dPoint start_uv,
1294 ON_3dPoint end_uv
1295 ) const;
1296
1297 // Helper for ON_Surface::Pushup overrides that handles "real" curve issues.
1298 ON_Curve* PushupCurveProxy( const ON_CurveProxy& curveproxy_2d,
1299 double tolerance,
1300 const ON_Interval* curve_2d_subdomain
1301 ) const;
1302};
1303
1304
1305#if defined(ON_DLL_TEMPLATE)
1306// This stuff is here because of a limitation in the way Microsoft
1307// handles templates and DLLs. See Microsoft's knowledge base
1308// article ID Q168958 for details.
1309#pragma warning( push )
1310#pragma warning( disable : 4231 )
1311ON_DLL_TEMPLATE template class ON_CLASS ON_SimpleArray<ON_Surface*>;
1312#pragma warning( pop )
1313#endif
1314
1316{
1317public:
1318 ON_SurfaceArray( int = 0 );
1320
1323
1324 void Destroy(); // deletes surfaces in array and sets count to 0
1325
1326 ON_BOOL32 Duplicate( ON_SurfaceArray& ) const; // operator= copies the pointer values
1327 // duplicate copies the surfaces themselves
1328};
1329
1330ON_DECL
1331double ON_ClosestPointAngle(const ON_Line&, const ON_Curve&, ON_Interval,const ON_3dPoint&,ON_3dPoint&, double*, double* );
1332
1333#endif
Copies the current selection to the clipboard.
Definition Duplicate.js:12
Definition opennurbs_point.h:403
Definition opennurbs_point.h:931
Definition opennurbs_archive.h:152
Definition opennurbs_bounding_box.h:25
Definition opennurbs_brep.h:1585
Definition opennurbs_array.h:760
Definition opennurbs_cone.h:26
Definition opennurbs_curve.h:88
Definition opennurbs_curveproxy.h:38
Definition opennurbs_cylinder.h:28
Definition opennurbs_geometry.h:36
virtual bool EvaluatePoint(const class ON_ObjRef &objref, ON_3dPoint &P) const
Definition opennurbs_geometry.cpp:247
virtual ON_Brep * BrepForm(ON_Brep *brep=NULL) const
Definition opennurbs_geometry.cpp:232
ON_Geometry & operator=(const ON_Geometry &)
Definition opennurbs_geometry.cpp:26
virtual ON_BOOL32 HasBrepForm() const
Definition opennurbs_geometry.cpp:226
Definition opennurbs_point.h:46
Definition opennurbs_line.h:20
Definition opennurbs_massprop.h:25
Definition opennurbs_mesh.h:795
Definition opennurbs_mesh.h:33
Definition opennurbs_nurbssurface.h:62
ON_BOOL32 Read(ON_BinaryArchive &)
Definition opennurbs_nurbssurface.cpp:702
ON_BOOL32 Write(ON_BinaryArchive &) const
Definition opennurbs_nurbssurface.cpp:653
void Destroy()
Definition opennurbs_nurbssurface.cpp:307
Definition opennurbs_objref.h:167
virtual unsigned int SizeOf() const
Definition opennurbs_object.cpp:1677
virtual ON::object_type ObjectType() const
Definition opennurbs_object.cpp:1616
virtual void DestroyRuntimeCache(bool bDelete=true)
Definition opennurbs_object.cpp:1757
Definition opennurbs_plane.h:20
Definition opennurbs_polycurve.h:38
Definition opennurbs_array.h:46
Definition opennurbs_sphere.h:22
Definition opennurbs_surface.h:1316
Definition opennurbs_surface.h:58
virtual ON_BOOL32 GetSpanVector(int dir, double *span_vector) const =0
ON_OBJECT_DECLARE(ON_Surface)
virtual int Degree(int dir) const =0
ON_SurfaceTree * m_stree
Definition opennurbs_surface.h:1267
virtual ON_BOOL32 Reverse(int)=0
virtual ON_BOOL32 Evaluate(double u, double v, int num_der, int array_stride, double *der_array, int quadrant=0, int *hint=0) const =0
ISO
Definition opennurbs_surface.h:73
virtual ON_BOOL32 Transpose()=0
virtual ON_Interval Domain(int dir) const =0
virtual int SpanCount(int dir) const =0
Definition opennurbs_torus.h:29
Parallel lines, concentric arcs, circles, equidistant curve to ellipses.
Definition Offset.js:11
Trims an entity to another entity or trims both entities if this.trimBoth is true.
Definition Trim.js:12
#define ON_ZERO_TOLERANCE
Definition opennurbs_defines.h:238
#define ON_DECL
Definition opennurbs_defines.h:92
#define ON_CLASS
Definition opennurbs_defines.h:91
#define ON_SQRT_EPSILON
Definition opennurbs_defines.h:147
const ON_3dPoint ON_UNSET_POINT(ON_UNSET_VALUE, ON_UNSET_VALUE, ON_UNSET_VALUE)
char s
Definition opennurbs_string.cpp:32
ON_DECL double ON_ClosestPointAngle(const ON_Line &, const ON_Curve &, ON_Interval, const ON_3dPoint &, ON_3dPoint &, double *, double *)
Definition opennurbs_revsurface.cpp:2384
#define NULL
Definition opennurbs_system.h:256
int ON_BOOL32
Definition opennurbs_system.h:362