OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
surfaces.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 Capgemini Engineering Research and Development.
2//
3// This file is part of OCCT-Light software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Affero General Public License version 3 as published
7// by the Free Software Foundation, with an option to use any later version.
8// Consult the file LICENSE_AGPL_30.txt included in OCCT-Light distribution
9// for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of a commercial
12// license or contractual agreement.
13//
14// SPDX-License-Identifier: AGPL-3.0-or-later
15
25#ifndef OCCTL_HPP_SURFACES_HPP
26#define OCCTL_HPP_SURFACES_HPP
27
29
30#include <occtl-hpp/core.hpp>
31#include <occtl-hpp/curves.hpp>
32#include <occtl-hpp/geom.hpp>
33
34#include <cstdint>
35#include <cstdlib>
36#include <tuple>
37#include <utility>
38#include <vector>
39
40#if defined(__cpp_lib_span) && __cpp_lib_span >= 202002L
41 #include <span>
42 #define OCCTL_HPP_HAS_SPAN 1
43#else
44 #define OCCTL_HPP_HAS_SPAN 0
45#endif
46
47namespace occtl
48{
49
55{
56public:
58 Surface(occtl_graph_t* theGraph = nullptr, occtl_rep_id_t theId = occtl_rep_id_t{0}) noexcept
59 : myGraph(theGraph),
60 myId(theId)
61 {
62 }
63
65 explicit operator bool() const noexcept { return myGraph != nullptr && myId.bits != 0; }
66
68 occtl_graph_t* graph() const noexcept { return myGraph; }
69
71 occtl_rep_id_t id() const noexcept { return myId; }
72
76 {
77 occtl_rep_id_t aId{};
78 check(::occtl_surface_reverse(myGraph, myId, &aId));
79 return Surface(myGraph, aId);
80 }
81
84 Surface transformed(const Transform& theTrsf) const
85 {
86 occtl_rep_id_t aId{};
87 check(::occtl_surface_transformed(myGraph, myId, theTrsf.c_type(), &aId));
88 return Surface(myGraph, aId);
89 }
90
93 Surface translated(const Vector3& theDelta) const
94 {
95 occtl_rep_id_t aId{};
96 check(::occtl_surface_translated(myGraph, myId, theDelta.c_type(), &aId));
97 return Surface(myGraph, aId);
98 }
99
102 Surface rotated(const Axis1Placement& theAxis, double theAngle) const
103 {
104 occtl_rep_id_t aId{};
105 check(::occtl_surface_rotated(myGraph, myId, theAxis.c_type(), theAngle, &aId));
106 return Surface(myGraph, aId);
107 }
108
111 Surface scaled(const Point3& theOrigin, double theFactor) const
112 {
113 occtl_rep_id_t aId{};
114 check(::occtl_surface_scaled(myGraph, myId, theOrigin.c_type(), theFactor, &aId));
115 return Surface(myGraph, aId);
116 }
117
120 double area() const
121 {
122 double anArea = 0.0;
123 check(::occtl_surface_area(myGraph, myId, &anArea));
124 return anArea;
125 }
126
130 std::tuple<double, double, double> project_point(const Point3& thePoint) const
131 {
132 double aU = 0.0, aV = 0.0, aDist = 0.0;
133 check(::occtl_surface_project_point(myGraph, myId, thePoint.c_type(), &aU, &aV, &aDist));
134 return {aU, aV, aDist};
135 }
136
140 std::pair<double, double> uv_of_point(const Point3& thePoint) const
141 {
142 double aU = 0.0, aV = 0.0;
143 check(::occtl_surface_uv_of_point(myGraph, myId, thePoint.c_type(), &aU, &aV));
144 return {aU, aV};
145 }
146
150 {
151 occtl_surface_kind_t aKind{};
152 check(::occtl_surface_kind(myGraph, myId, &aKind));
153 return aKind;
154 }
155
158 int32_t is_u_periodic() const
159 {
160 int32_t aVal = 0;
161 check(::occtl_surface_is_u_periodic(myGraph, myId, &aVal));
162 return aVal;
163 }
164
167 int32_t is_v_periodic() const
168 {
169 int32_t aVal = 0;
170 check(::occtl_surface_is_v_periodic(myGraph, myId, &aVal));
171 return aVal;
172 }
173
176 int32_t is_closed() const
177 {
178 int32_t aVal = 0;
179 check(::occtl_surface_is_closed(myGraph, myId, &aVal));
180 return aVal;
181 }
182
185 int32_t is_periodic() const
186 {
187 int32_t aVal = 0;
188 check(::occtl_surface_is_periodic(myGraph, myId, &aVal));
189 return aVal;
190 }
191
195 {
197 check(::occtl_surface_continuity(myGraph, myId, &aCont));
198 return aCont;
199 }
200
203 void parameter_range(double& theUMin, double& theUMax, double& theVMin, double& theVMax) const
204 {
205 check(::occtl_surface_parameter_range(myGraph, myId, &theUMin, &theUMax, &theVMin, &theVMax));
206 }
207
211 {
212 occtl_geom_plane_t aOut{};
213 check(::occtl_surface_as_plane(myGraph, myId, &aOut));
214 return aOut;
215 }
216
220 {
222 check(::occtl_surface_as_cylinder(myGraph, myId, &aOut));
223 return aOut;
224 }
225
229 {
231 check(::occtl_surface_as_cone(myGraph, myId, &aOut));
232 return aOut;
233 }
234
238 {
240 check(::occtl_surface_as_sphere(myGraph, myId, &aOut));
241 return aOut;
242 }
243
247 {
249 check(::occtl_surface_as_torus(myGraph, myId, &aOut));
250 return aOut;
251 }
252
253 struct RevolutionView;
254 struct ExtrusionView;
255 struct RectangularTrimmedView;
256 struct OffsetView;
257 struct BSplineView;
258
259 inline RevolutionView as_revolution() const;
260 inline ExtrusionView as_extrusion() const;
261 inline RectangularTrimmedView as_rectangular_trimmed() const;
262 inline OffsetView as_offset() const;
263
271 inline BSplineView as_bspline() const;
272
275 int32_t bspline_u_degree() const
276 {
277 int32_t aVal = 0;
278 check(::occtl_surface_bspline_u_degree(myGraph, myId, &aVal));
279 return aVal;
280 }
281
284 int32_t bspline_v_degree() const
285 {
286 int32_t aVal = 0;
287 check(::occtl_surface_bspline_v_degree(myGraph, myId, &aVal));
288 return aVal;
289 }
290
293 size_t bspline_u_pole_count() const
294 {
295 size_t aVal = 0;
296 check(::occtl_surface_bspline_u_pole_count(myGraph, myId, &aVal));
297 return aVal;
298 }
299
302 size_t bspline_v_pole_count() const
303 {
304 size_t aVal = 0;
305 check(::occtl_surface_bspline_v_pole_count(myGraph, myId, &aVal));
306 return aVal;
307 }
308
311 size_t bspline_u_knot_count() const
312 {
313 size_t aVal = 0;
314 check(::occtl_surface_bspline_u_knot_count(myGraph, myId, &aVal));
315 return aVal;
316 }
317
320 size_t bspline_v_knot_count() const
321 {
322 size_t aVal = 0;
323 check(::occtl_surface_bspline_v_knot_count(myGraph, myId, &aVal));
324 return aVal;
325 }
326
329 int32_t bspline_is_rational() const
330 {
331 int32_t aVal = 0;
332 check(::occtl_surface_bspline_is_rational(myGraph, myId, &aVal));
333 return aVal;
334 }
335
338 int32_t bezier_u_degree() const
339 {
340 int32_t aVal = 0;
341 check(::occtl_surface_bezier_u_degree(myGraph, myId, &aVal));
342 return aVal;
343 }
344
347 int32_t bezier_v_degree() const
348 {
349 int32_t aVal = 0;
350 check(::occtl_surface_bezier_v_degree(myGraph, myId, &aVal));
351 return aVal;
352 }
353
356 size_t bezier_u_pole_count() const
357 {
358 size_t aVal = 0;
359 check(::occtl_surface_bezier_u_pole_count(myGraph, myId, &aVal));
360 return aVal;
361 }
362
365 size_t bezier_v_pole_count() const
366 {
367 size_t aVal = 0;
368 check(::occtl_surface_bezier_v_pole_count(myGraph, myId, &aVal));
369 return aVal;
370 }
371
374 int32_t bezier_is_rational() const
375 {
376 int32_t aVal = 0;
377 check(::occtl_surface_bezier_is_rational(myGraph, myId, &aVal));
378 return aVal;
379 }
380
383 std::vector<occtl_point3_t> bspline_poles() const
384 {
385 size_t aNb = 0;
386 check(::occtl_surface_bspline_poles(myGraph, myId, nullptr, 0, &aNb));
387 std::vector<occtl_point3_t> aVec(aNb);
388 check(::occtl_surface_bspline_poles(myGraph, myId, aVec.data(), aNb, &aNb));
389 return aVec;
390 }
391
394 std::vector<double> bspline_u_knots() const
395 {
396 size_t aNb = 0;
397 check(::occtl_surface_bspline_u_knots(myGraph, myId, nullptr, 0, &aNb));
398 std::vector<double> aVec(aNb);
399 check(::occtl_surface_bspline_u_knots(myGraph, myId, aVec.data(), aNb, &aNb));
400 return aVec;
401 }
402
405 std::vector<double> bspline_v_knots() const
406 {
407 size_t aNb = 0;
408 check(::occtl_surface_bspline_v_knots(myGraph, myId, nullptr, 0, &aNb));
409 std::vector<double> aVec(aNb);
410 check(::occtl_surface_bspline_v_knots(myGraph, myId, aVec.data(), aNb, &aNb));
411 return aVec;
412 }
413
416 std::vector<int32_t> bspline_u_multiplicities() const
417 {
418 size_t aNb = 0;
419 check(::occtl_surface_bspline_u_multiplicities(myGraph, myId, nullptr, 0, &aNb));
420 std::vector<int32_t> aVec(aNb);
421 check(::occtl_surface_bspline_u_multiplicities(myGraph, myId, aVec.data(), aNb, &aNb));
422 return aVec;
423 }
424
427 std::vector<int32_t> bspline_v_multiplicities() const
428 {
429 size_t aNb = 0;
430 check(::occtl_surface_bspline_v_multiplicities(myGraph, myId, nullptr, 0, &aNb));
431 std::vector<int32_t> aVec(aNb);
432 check(::occtl_surface_bspline_v_multiplicities(myGraph, myId, aVec.data(), aNb, &aNb));
433 return aVec;
434 }
435
438 std::vector<double> bspline_weights() const
439 {
440 size_t aNb = 0;
441 check(::occtl_surface_bspline_weights(myGraph, myId, nullptr, 0, &aNb));
442 std::vector<double> aVec(aNb);
443 check(::occtl_surface_bspline_weights(myGraph, myId, aVec.data(), aNb, &aNb));
444 return aVec;
445 }
446
449 std::vector<double> bspline_u_flat_knots() const
450 {
451 size_t aNb = 0;
452 check(::occtl_surface_bspline_u_flat_knots(myGraph, myId, nullptr, 0, &aNb));
453 std::vector<double> aVec(aNb);
454 check(::occtl_surface_bspline_u_flat_knots(myGraph, myId, aVec.data(), aNb, &aNb));
455 return aVec;
456 }
457
460 std::vector<double> bspline_v_flat_knots() const
461 {
462 size_t aNb = 0;
463 check(::occtl_surface_bspline_v_flat_knots(myGraph, myId, nullptr, 0, &aNb));
464 std::vector<double> aVec(aNb);
465 check(::occtl_surface_bspline_v_flat_knots(myGraph, myId, aVec.data(), aNb, &aNb));
466 return aVec;
467 }
468
472 const occtl_point3_t* bspline_poles_view(size_t& theNbU, size_t& theNbV) const
473 {
474 const occtl_point3_t* aData = nullptr;
475 check(::occtl_surface_bspline_poles_view(myGraph, myId, &aData, &theNbU, &theNbV));
476 return aData;
477 }
478
482 {
483 occtl_rep_id_t aId{};
484 check(::occtl_surface_create_plane(graph, &aId, thePlane));
485 return Surface(graph, aId);
486 }
487
491 {
492 occtl_rep_id_t aId{};
494 return Surface(graph, aId);
495 }
496
500 {
501 occtl_rep_id_t aId{};
502 check(::occtl_surface_create_cone(graph, &aId, theCone));
503 return Surface(graph, aId);
504 }
505
509 {
510 occtl_rep_id_t aId{};
511 check(::occtl_surface_create_sphere(graph, &aId, theSphere));
512 return Surface(graph, aId);
513 }
514
518 {
519 occtl_rep_id_t aId{};
520 check(::occtl_surface_create_torus(graph, &aId, theTorus));
521 return Surface(graph, aId);
522 }
523
528 {
529 occtl_rep_id_t aId{};
531 return Surface(graph, aId);
532 }
533
538 {
539 occtl_rep_id_t aId{};
540 check(::occtl_surface_create_bezier(graph, &aId, &theInfo));
541 return Surface(graph, aId);
542 }
543
548 {
549 occtl_rep_id_t aId{};
551 return Surface(graph, aId);
552 }
553
558 {
559 occtl_rep_id_t aId{};
561 return Surface(graph, aId);
562 }
563
568 {
569 occtl_rep_id_t aId{};
571 return Surface(graph, aId);
572 }
573
583
587 {
588 occtl_rep_id_t aId{};
589 check(::occtl_surface_create_offset(graph, &aId, &theInfo));
590 return Surface(graph, aId);
591 }
592
597 {
598 occtl_rep_id_t aId{};
600 return Surface(graph, aId);
601 }
602
607 {
608 occtl_rep_id_t aId{};
610 return Surface(graph, aId);
611 }
612
617 {
618 occtl_rep_id_t aId{};
620 return Surface(graph, aId);
621 }
622
626 const std::vector<const Curve*>& theCurves,
628 {
629 std::vector<occtl_rep_id_t> aRaw;
630 aRaw.reserve(theCurves.size());
631 for (const Curve* aCurve : theCurves)
632 {
633 aRaw.push_back(aCurve == nullptr ? occtl_rep_id_t{0} : aCurve->id());
634 }
635
637 OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_INIT;
638 anInfo.curves = aRaw.empty() ? nullptr : aRaw.data();
639 anInfo.curve_count = aRaw.size();
640 anInfo.style = theStyle;
641
642 occtl_rep_id_t aId{};
644 return Surface(graph, aId);
645 }
646
649 const std::vector<const Curve*>& theProfiles,
650 const std::vector<const Curve*>& theGuides,
651 const double theTolerance = 1.0e-7,
652 const bool theParallel = false)
653 {
654 std::vector<occtl_rep_id_t> aProfileRaw;
655 aProfileRaw.reserve(theProfiles.size());
656 for (const Curve* aCurve : theProfiles)
657 {
658 aProfileRaw.push_back(aCurve == nullptr ? occtl_rep_id_t{0} : aCurve->id());
659 }
660
661 std::vector<occtl_rep_id_t> aGuideRaw;
662 aGuideRaw.reserve(theGuides.size());
663 for (const Curve* aCurve : theGuides)
664 {
665 aGuideRaw.push_back(aCurve == nullptr ? occtl_rep_id_t{0} : aCurve->id());
666 }
667
668 occtl_surface_gordon_create_info_t anInfo = OCCTL_SURFACE_GORDON_CREATE_INFO_INIT;
669 anInfo.profiles = aProfileRaw.empty() ? nullptr : aProfileRaw.data();
670 anInfo.profile_count = aProfileRaw.size();
671 anInfo.guides = aGuideRaw.empty() ? nullptr : aGuideRaw.data();
672 anInfo.guide_count = aGuideRaw.size();
673 anInfo.tolerance = theTolerance;
674 anInfo.parallel = theParallel ? 1 : 0;
675
676 occtl_rep_id_t aId{};
678 return Surface(graph, aId);
679 }
680
683 const std::vector<const Curve*>& theUCurves,
684 const std::vector<const Curve*>& theVCurves,
685 const double theTolerance = 1.0e-7,
686 const bool theParallel = false)
687 {
688 std::vector<occtl_rep_id_t> aURaw;
689 aURaw.reserve(theUCurves.size());
690 for (const Curve* aCurve : theUCurves)
691 {
692 aURaw.push_back(aCurve == nullptr ? occtl_rep_id_t{0} : aCurve->id());
693 }
694
695 std::vector<occtl_rep_id_t> aVRaw;
696 aVRaw.reserve(theVCurves.size());
697 for (const Curve* aCurve : theVCurves)
698 {
699 aVRaw.push_back(aCurve == nullptr ? occtl_rep_id_t{0} : aCurve->id());
700 }
701
702 occtl_surface_curve_grid_create_info_t anInfo = OCCTL_SURFACE_CURVE_GRID_CREATE_INFO_INIT;
703 anInfo.u_curves = aURaw.empty() ? nullptr : aURaw.data();
704 anInfo.u_curve_count = aURaw.size();
705 anInfo.v_curves = aVRaw.empty() ? nullptr : aVRaw.data();
706 anInfo.v_curve_count = aVRaw.size();
707 anInfo.tolerance = theTolerance;
708 anInfo.parallel = theParallel ? 1 : 0;
709
710 occtl_rep_id_t aId{};
712 return Surface(graph, aId);
713 }
714
718 std::vector<occtl_point3_t> intersect_curve(const Curve& theCurve) const
719 {
720 size_t aNb = 0;
721 check(::occtl_surface_intersect_curve(myGraph, myId, theCurve.id(), nullptr, 0, &aNb));
722 std::vector<occtl_point3_t> aResult(aNb);
723 check(::occtl_surface_intersect_curve(myGraph, myId, theCurve.id(), aResult.data(), aNb, &aNb));
724 return aResult;
725 }
726
730 std::vector<Curve> intersect_surface(const Surface& theOther, double theTolerance = 1.0e-7) const
731 {
732 occtl_rep_id_t* aRaw = nullptr;
733 size_t aNb = 0;
734 check(
735 ::occtl_surface_surface_intersect(myGraph, myId, theOther.myId, theTolerance, &aRaw, &aNb));
736 std::vector<Curve> aResult;
737 aResult.reserve(aNb);
738 for (size_t anI = 0; anI < aNb; ++anI)
739 {
740 aResult.emplace_back(myGraph, aRaw[anI]);
741 }
742 std::free(aRaw);
743 return aResult;
744 }
745
748 occtl_point3_t eval_d0(const double theU, const double theV) const
749 {
750 occtl_point3_t aP{};
751 check(::occtl_surface_eval_d0(myGraph, myId, theU, theV, &aP));
752 return aP;
753 }
754
758 std::tuple<occtl_point3_t, occtl_vector3_t, occtl_vector3_t> eval_d1(const double theU,
759 const double theV) const
760 {
761 occtl_point3_t aP{};
762 occtl_vector3_t aD1U{}, aD1V{};
763 check(::occtl_surface_eval_d1(myGraph, myId, theU, theV, &aP, &aD1U, &aD1V));
764 return {aP, aD1U, aD1V};
765 }
766
771 std::tuple<occtl_point3_t,
777 eval_d2(const double theU, const double theV) const
778 {
779 occtl_point3_t aP{};
780 occtl_vector3_t aD1U{}, aD1V{}, aD2U{}, aD2V{}, aD2UV{};
781 check(
782 ::occtl_surface_eval_d2(myGraph, myId, theU, theV, &aP, &aD1U, &aD1V, &aD2U, &aD2V, &aD2UV));
783 return {aP, aD1U, aD1V, aD2U, aD2V, aD2UV};
784 }
785
789 std::tuple<occtl_point3_t,
799 eval_d3(const double theU, const double theV) const
800 {
801 occtl_point3_t aP{};
802 occtl_vector3_t aD1U{}, aD1V{}, aD2U{}, aD2V{}, aD2UV{};
803 occtl_vector3_t aD3U{}, aD3V{}, aD3UUV{}, aD3UVV{};
805 myId,
806 theU,
807 theV,
808 &aP,
809 &aD1U,
810 &aD1V,
811 &aD2U,
812 &aD2V,
813 &aD2UV,
814 &aD3U,
815 &aD3V,
816 &aD3UUV,
817 &aD3UVV));
818 return {aP, aD1U, aD1V, aD2U, aD2V, aD2UV, aD3U, aD3V, aD3UUV, aD3UVV};
819 }
820
825 occtl_vector3_t eval_dn(const double theU,
826 const double theV,
827 const int32_t theNu,
828 const int32_t theNv) const
829 {
830 occtl_vector3_t aD{};
831 check(::occtl_surface_eval_dn(myGraph, myId, theU, theV, theNu, theNv, &aD));
832 return aD;
833 }
834
835private:
836 occtl_graph_t* myGraph;
837 occtl_rep_id_t myId;
838};
839
844
846{
847 occtl_vector3_t direction;
848};
849
851{
852 double u_first;
853 double u_last;
854 double v_first;
855 double v_last;
856};
857
859{
860 double offset;
861};
862
863inline Surface::RevolutionView Surface::as_revolution() const
864{
866 check(::occtl_surface_as_revolution(myGraph, myId, &aAxis));
867 return {aAxis};
868}
869
870inline Surface::ExtrusionView Surface::as_extrusion() const
871{
872 occtl_vector3_t aDir{};
873 check(::occtl_surface_as_extrusion(myGraph, myId, &aDir));
874 return {aDir};
875}
876
877inline Surface::RectangularTrimmedView Surface::as_rectangular_trimmed() const
878{
879 double aU0 = 0.0, aU1 = 0.0, aV0 = 0.0, aV1 = 0.0;
880 check(::occtl_surface_as_rectangular_trimmed(myGraph, myId, &aU0, &aU1, &aV0, &aV1));
881 return {aU0, aU1, aV0, aV1};
882}
883
884inline Surface::OffsetView Surface::as_offset() const
885{
886 double aOff = 0.0;
887 check(::occtl_surface_as_offset(myGraph, myId, &aOff));
888 return {aOff};
889}
890
899{
901
902 int32_t u_degree() const noexcept { return raw.u_degree; }
903
904 int32_t v_degree() const noexcept { return raw.v_degree; }
905
906 bool is_rational() const noexcept { return raw.is_rational != 0; }
907
908 bool is_u_periodic() const noexcept { return raw.is_u_periodic != 0; }
909
910 bool is_v_periodic() const noexcept { return raw.is_v_periodic != 0; }
911
912 size_t u_pole_count() const noexcept { return raw.u_pole_count; }
913
914 size_t v_pole_count() const noexcept { return raw.v_pole_count; }
915
916 size_t u_knot_count() const noexcept { return raw.u_knot_count; }
917
918 size_t v_knot_count() const noexcept { return raw.v_knot_count; }
919
920 size_t u_flat_knot_count() const noexcept { return raw.u_flat_knot_count; }
921
922 size_t v_flat_knot_count() const noexcept { return raw.v_flat_knot_count; }
923
924#if OCCTL_HPP_HAS_SPAN
925 std::span<const occtl_point3_t> poles() const noexcept
926 {
927 return {raw.poles, raw.u_pole_count * raw.v_pole_count};
928 }
929
930 std::span<const double> weights() const noexcept
931 {
932 return raw.weights ? std::span<const double>{raw.weights, raw.u_pole_count * raw.v_pole_count}
933 : std::span<const double>{};
934 }
935
936 std::span<const double> u_knots() const noexcept { return {raw.u_knots, raw.u_knot_count}; }
937
938 std::span<const double> v_knots() const noexcept { return {raw.v_knots, raw.v_knot_count}; }
939
940 std::span<const int32_t> u_multiplicities() const noexcept
941 {
942 return {raw.u_multiplicities, raw.u_knot_count};
943 }
944
945 std::span<const int32_t> v_multiplicities() const noexcept
946 {
947 return {raw.v_multiplicities, raw.v_knot_count};
948 }
949
950 std::span<const double> u_flat_knots() const noexcept
951 {
952 return {raw.u_flat_knots, raw.u_flat_knot_count};
953 }
954
955 std::span<const double> v_flat_knots() const noexcept
956 {
957 return {raw.v_flat_knots, raw.v_flat_knot_count};
958 }
959#else
960 const occtl_point3_t* poles() const noexcept { return raw.poles; }
961
962 const double* weights() const noexcept { return raw.weights; }
963
964 const double* u_knots() const noexcept { return raw.u_knots; }
965
966 const double* v_knots() const noexcept { return raw.v_knots; }
967
968 const int32_t* u_multiplicities() const noexcept { return raw.u_multiplicities; }
969
970 const int32_t* v_multiplicities() const noexcept { return raw.v_multiplicities; }
971
972 const double* u_flat_knots() const noexcept { return raw.u_flat_knots; }
973
974 const double* v_flat_knots() const noexcept { return raw.v_flat_knots; }
975#endif
976};
977
979{
980 BSplineView aView;
982 check(::occtl_surface_as_bspline(myGraph, myId, &aView.raw));
983 return aView;
984}
985
986} // namespace occtl
987
988#endif // OCCTL_HPP_SURFACES_HPP
Non-owning reference to a 3D geometric curve stored in a graph.
Definition curves.hpp:54
occtl_rep_id_t id() const noexcept
Returns the representation id.
Definition curves.hpp:70
Non-owning reference to a geometric surface stored in a graph.
Definition surfaces.hpp:55
static Surface from_sphere(occtl_graph_t *graph, const occtl_geom_spherical_surface_t &theSphere)
Constructs a surface from a sphere.
Definition surfaces.hpp:508
size_t bspline_u_pole_count() const
Returns the number of poles in the U direction.
Definition surfaces.hpp:293
static Surface from_bspline(occtl_graph_t *graph, const occtl_surface_bspline_create_info_t &theInfo)
Constructs a B-spline surface from the given create info.
Definition surfaces.hpp:526
static Surface from_extrusion(occtl_graph_t *graph, const occtl_surface_extrusion_create_info_t &theInfo)
Constructs a surface of linear extrusion.
Definition surfaces.hpp:566
int32_t is_periodic() const
Returns 1 when the surface is periodic in either U or V direction.
Definition surfaces.hpp:185
occtl_point3_t eval_d0(const double theU, const double theV) const
Evaluates the surface point at (theU, theV).
Definition surfaces.hpp:748
occtl_rep_id_t id() const noexcept
Returns the representation id.
Definition surfaces.hpp:71
std::tuple< occtl_point3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t > eval_d3(const double theU, const double theV) const
Evaluates point and first-, second-, and third-order partial derivatives at (theU,...
Definition surfaces.hpp:799
std::vector< double > bspline_u_flat_knots() const
Copies the expanded U flat knot sequence into a vector.
Definition surfaces.hpp:449
occtl_geom_conical_surface_t as_cone() const
Extracts the underlying cone.
Definition surfaces.hpp:228
size_t bezier_v_pole_count() const
Returns the number of poles in the V direction of a Bezier surface.
Definition surfaces.hpp:365
Surface transformed(const Transform &theTrsf) const
Returns a transformed copy of this surface stored in the same graph.
Definition surfaces.hpp:84
std::vector< int32_t > bspline_u_multiplicities() const
Copies U knot multiplicities into a vector.
Definition surfaces.hpp:416
occtl_geom_cylindrical_surface_t as_cylinder() const
Extracts the underlying cylinder.
Definition surfaces.hpp:219
BSplineView as_bspline() const
Returns a aggregate inspection view of a B-spline surface.
Definition surfaces.hpp:978
size_t bspline_v_knot_count() const
Returns the number of distinct V knot values.
Definition surfaces.hpp:320
void parameter_range(double &theUMin, double &theUMax, double &theVMin, double &theVMax) const
Returns the parameter range via out-parameters.
Definition surfaces.hpp:203
static Surface from_revolution(occtl_graph_t *graph, const occtl_surface_revolution_create_info_t &theInfo)
Constructs a surface of revolution.
Definition surfaces.hpp:556
std::vector< double > bspline_u_knots() const
Copies U knot values into a vector.
Definition surfaces.hpp:394
static Surface from_approximation(occtl_graph_t *graph, const occtl_surface_approximated_info_t &theInfo)
Constructs a surface by approximating the given point grid.
Definition surfaces.hpp:605
static Surface from_cylinder(occtl_graph_t *graph, const occtl_geom_cylindrical_surface_t &theCyl)
Constructs a surface from a cylinder.
Definition surfaces.hpp:490
Surface rotated(const Axis1Placement &theAxis, double theAngle) const
Returns a rotated copy of this surface stored in the same graph.
Definition surfaces.hpp:102
std::vector< Curve > intersect_surface(const Surface &theOther, double theTolerance=1.0e-7) const
Computes intersection curves with another surface. Each result curve wraps a rep id in the same graph...
Definition surfaces.hpp:730
std::vector< double > bspline_v_knots() const
Copies V knot values into a vector.
Definition surfaces.hpp:405
static Surface from_offset(occtl_graph_t *graph, const occtl_surface_offset_create_info_t &theInfo)
Constructs an offset surface.
Definition surfaces.hpp:585
int32_t is_closed() const
Returns 1 when the surface is closed in both U and V directions.
Definition surfaces.hpp:176
occtl_geom_continuity_t continuity() const
Returns the geometric continuity class.
Definition surfaces.hpp:194
static Surface from_gordon(occtl_graph_t *graph, const std::vector< const Curve * > &theProfiles, const std::vector< const Curve * > &theGuides, const double theTolerance=1.0e-7, const bool theParallel=false)
Constructs a Gordon B-spline surface from profile and guide curves.
Definition surfaces.hpp:648
std::tuple< occtl_point3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t, occtl_vector3_t > eval_d2(const double theU, const double theV) const
Evaluates point and first- and second-order partial derivatives at (theU, theV). Returns (point,...
Definition surfaces.hpp:777
Surface(occtl_graph_t *theGraph=nullptr, occtl_rep_id_t theId=occtl_rep_id_t{0}) noexcept
Constructs a null reference (no graph, invalid id).
Definition surfaces.hpp:58
occtl_vector3_t eval_dn(const double theU, const double theV, const int32_t theNu, const int32_t theNv) const
Returns a partial derivative vector at (theU, theV).
Definition surfaces.hpp:825
static Surface from_interpolation(occtl_graph_t *graph, const occtl_surface_interpolated_info_t &theInfo)
Constructs a surface by interpolating through the given point grid.
Definition surfaces.hpp:595
occtl_surface_kind_t kind() const
Returns the kind of surface this handle holds.
Definition surfaces.hpp:149
size_t bspline_u_knot_count() const
Returns the number of distinct U knot values.
Definition surfaces.hpp:311
occtl_graph_t * graph() const noexcept
Borrows it — returns the graph pointer.
Definition surfaces.hpp:68
std::pair< double, double > uv_of_point(const Point3 &thePoint) const
Returns the UV coordinates on the surface nearest to a point.
Definition surfaces.hpp:140
static Surface from_plane(occtl_graph_t *graph, const occtl_geom_plane_t &thePlane)
Constructs a surface from a plane.
Definition surfaces.hpp:481
Surface reversed() const
Returns a U-reversed copy of this surface stored in the same graph.
Definition surfaces.hpp:75
occtl_geom_spherical_surface_t as_sphere() const
Extracts the underlying sphere.
Definition surfaces.hpp:237
int32_t bspline_v_degree() const
Returns the V polynomial degree.
Definition surfaces.hpp:284
std::vector< double > bspline_weights() const
Copies all weights (row-major u*v_pole_count + v) into a vector.
Definition surfaces.hpp:438
const occtl_point3_t * bspline_poles_view(size_t &theNbU, size_t &theNbV) const
Returns a zero-copy view of the surface poles array (row-major u*v_pole_count + v)....
Definition surfaces.hpp:472
std::vector< occtl_point3_t > bspline_poles() const
Copies poles (row-major: u * v_pole_count + v) into a vector.
Definition surfaces.hpp:383
int32_t bspline_is_rational() const
Returns 1 when the surface is rational in either U or V, 0 otherwise.
Definition surfaces.hpp:329
static Surface from_cone(occtl_graph_t *graph, const occtl_geom_conical_surface_t &theCone)
Constructs a surface from a cone.
Definition surfaces.hpp:499
static Surface from_point_grid(occtl_graph_t *graph, const occtl_surface_point_grid_create_info_t &theInfo)
Constructs a B-spline surface from a point grid.
Definition surfaces.hpp:615
int32_t bezier_v_degree() const
Returns the V degree of a Bezier surface.
Definition surfaces.hpp:347
static Surface from_bezier(occtl_graph_t *graph, const occtl_surface_bezier_create_info_t &theInfo)
Constructs a Bezier surface from the given create info.
Definition surfaces.hpp:536
static Surface from_rectangular_trimmed(occtl_graph_t *graph, const occtl_surface_rectangular_trimmed_create_info_t &theInfo)
Constructs a rectangular-trimmed surface.
Definition surfaces.hpp:575
size_t bspline_v_pole_count() const
Returns the number of poles in the V direction.
Definition surfaces.hpp:302
occtl_geom_toroidal_surface_t as_torus() const
Extracts the underlying torus.
Definition surfaces.hpp:246
Surface translated(const Vector3 &theDelta) const
Returns a translated copy of this surface stored in the same graph.
Definition surfaces.hpp:93
std::vector< int32_t > bspline_v_multiplicities() const
Copies V knot multiplicities into a vector.
Definition surfaces.hpp:427
std::vector< double > bspline_v_flat_knots() const
Copies the expanded V flat knot sequence into a vector.
Definition surfaces.hpp:460
int32_t bezier_is_rational() const
Returns 1 when the Bezier surface is rational, 0 otherwise.
Definition surfaces.hpp:374
std::tuple< occtl_point3_t, occtl_vector3_t, occtl_vector3_t > eval_d1(const double theU, const double theV) const
Evaluates point and first-order partial derivatives at (theU, theV). Returns (point,...
Definition surfaces.hpp:758
static Surface from_torus(occtl_graph_t *graph, const occtl_geom_toroidal_surface_t &theTorus)
Constructs a surface from a torus.
Definition surfaces.hpp:517
static Surface from_boundary_curves(occtl_graph_t *graph, const std::vector< const Curve * > &theCurves, ::occtl_surface_filling_style_t theStyle=OCCTL_SURFACE_FILLING_STRETCH)
Constructs a B-spline surface from contiguous boundary curves.
Definition surfaces.hpp:624
std::vector< occtl_point3_t > intersect_curve(const Curve &theCurve) const
Computes intersection points with a curve. Two-call pattern handled internally; returns a vector of i...
Definition surfaces.hpp:718
int32_t is_v_periodic() const
Returns 1 when the surface is periodic in the V direction.
Definition surfaces.hpp:167
size_t bezier_u_pole_count() const
Returns the number of poles in the U direction of a Bezier surface.
Definition surfaces.hpp:356
Surface scaled(const Point3 &theOrigin, double theFactor) const
Returns a scaled copy of this surface stored in the same graph.
Definition surfaces.hpp:111
int32_t is_u_periodic() const
Returns 1 when the surface is periodic in the U direction.
Definition surfaces.hpp:158
std::tuple< double, double, double > project_point(const Point3 &thePoint) const
Projects a point onto the surface.
Definition surfaces.hpp:130
double area() const
Returns the surface area over its full UV domain.
Definition surfaces.hpp:120
int32_t bspline_u_degree() const
Returns the U polynomial degree.
Definition surfaces.hpp:275
occtl_geom_plane_t as_plane() const
Extracts the underlying plane.
Definition surfaces.hpp:210
int32_t bezier_u_degree() const
Returns the U degree of a Bezier surface.
Definition surfaces.hpp:338
static Surface from_bezier_grid(occtl_graph_t *graph, const occtl_surface_bezier_create_info_t &theInfo)
Constructs a Bezier surface from a row-major pole grid.
Definition surfaces.hpp:546
static Surface from_curve_grid(occtl_graph_t *graph, const std::vector< const Curve * > &theUCurves, const std::vector< const Curve * > &theVCurves, const double theTolerance=1.0e-7, const bool theParallel=false)
Constructs a B-spline surface from an intersecting U/V curve grid.
Definition surfaces.hpp:682
C++ veneer for the core module.
void check(const ::occtl_status_t theStatus)
Throw on non-OK; otherwise a no-op.
Definition core.hpp:85
C++ veneer for 3D curve representations in the topology graph.
C++ veneer for the geom module.
enum occtl_geom_continuity occtl_geom_continuity_t
OCCT-Light: surface geometry via graph + rep_id.
occtl_status_t occtl_surface_transformed(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_transform_t transform, occtl_rep_id_t *out_id)
occtl_status_t occtl_surface_eval_d3(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv, occtl_vector3_t *out_d3u, occtl_vector3_t *out_d3v, occtl_vector3_t *out_d3uuv, occtl_vector3_t *out_d3uvv)
occtl_status_t occtl_surface_as_plane(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_plane_t *out_plane)
occtl_status_t occtl_surface_create_sphere(occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_spherical_surface_t sphere)
occtl_status_t occtl_surface_create_extrusion(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_extrusion_create_info_t *info)
occtl_status_t occtl_surface_continuity(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_continuity_t *out_continuity)
occtl_status_t occtl_surface_bezier_v_degree(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
occtl_status_t occtl_surface_bezier_u_pole_count(const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
occtl_status_t occtl_surface_as_revolution(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_axis1_placement_t *out_axis)
occtl_status_t occtl_surface_bspline_v_degree(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
occtl_status_t occtl_surface_parameter_range(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_u_min, double *out_u_max, double *out_v_min, double *out_v_max)
occtl_status_t occtl_surface_as_cone(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_conical_surface_t *out_cone)
occtl_status_t occtl_surface_eval_d0(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point)
occtl_status_t occtl_surface_create_gordon(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_gordon_create_info_t *info)
occtl_status_t occtl_surface_is_v_periodic(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_periodic)
occtl_status_t occtl_surface_bspline_u_multiplicities(occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_reverse(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_rep_id_t *out_id)
occtl_status_t occtl_surface_is_closed(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_closed)
occtl_status_t occtl_surface_as_cylinder(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_cylindrical_surface_t *out_cylinder)
occtl_status_t occtl_surface_bspline_u_knot_count(const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
occtl_status_t occtl_surface_bspline_v_knot_count(const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
occtl_status_t occtl_surface_eval_d2(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv)
occtl_status_t occtl_surface_project_point(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t point, double *out_u, double *out_v, double *out_distance)
occtl_status_t occtl_surface_as_rectangular_trimmed(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_u_first, double *out_u_last, double *out_v_first, double *out_v_last)
occtl_status_t occtl_surface_bspline_v_flat_knots(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_bspline_u_knots(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_bspline_v_pole_count(const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
occtl_status_t occtl_surface_create_bezier(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_bezier_create_info_t *info)
occtl_status_t occtl_surface_as_torus(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_toroidal_surface_t *out_torus)
occtl_status_t occtl_surface_bspline_v_knots(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_intersect_curve(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_rep_id_t curve_id, occtl_point3_t *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_create_bspline(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_bspline_create_info_t *info)
occtl_status_t occtl_surface_bspline_is_rational(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_rational)
occtl_status_t occtl_surface_area(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_area)
occtl_status_t occtl_surface_as_offset(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_offset)
occtl_status_t occtl_surface_create_cylinder(occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_cylindrical_surface_t cylinder)
occtl_status_t occtl_surface_rotated(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_axis1_placement_t axis, double angle, occtl_rep_id_t *out_id)
occtl_status_t occtl_surface_bezier_u_degree(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
occtl_status_t occtl_surface_create_bezier_grid(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_bezier_create_info_t *info)
occtl_status_t occtl_surface_as_extrusion(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_vector3_t *out_direction)
occtl_status_t occtl_surface_create_plane(occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_plane_t plane)
occtl_status_t occtl_surface_bezier_is_rational(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_rational)
occtl_status_t occtl_surface_scaled(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t origin, double factor, occtl_rep_id_t *out_id)
occtl_status_t occtl_surface_bezier_v_pole_count(const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
occtl_status_t occtl_surface_create_from_curve_grid(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_curve_grid_create_info_t *info)
occtl_status_t occtl_surface_create_torus(occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_toroidal_surface_t torus)
occtl_status_t occtl_surface_create_from_point_grid(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_point_grid_create_info_t *info)
occtl_surface_kind
Definition occtl_surfaces.h:52
occtl_status_t occtl_surface_create_revolution(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_revolution_create_info_t *info)
occtl_status_t occtl_surface_eval_d1(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v)
occtl_status_t occtl_surface_is_u_periodic(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_periodic)
enum occtl_surface_kind occtl_surface_kind_t
occtl_status_t occtl_surface_bspline_u_pole_count(const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
occtl_status_t occtl_surface_eval_dn(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, int32_t nu, int32_t nv, occtl_vector3_t *out_derivative)
occtl_status_t occtl_surface_surface_intersect(occtl_graph_t *graph, occtl_rep_id_t surface_a, occtl_rep_id_t surface_b, double tolerance, occtl_rep_id_t **out_ids, size_t *out_count)
occtl_status_t occtl_surface_create_approximated(occtl_graph_t *graph, const occtl_surface_approximated_info_t *info, occtl_rep_id_t *out_id)
occtl_status_t occtl_surface_bspline_poles_view(occtl_graph_t *graph, occtl_rep_id_t surface_id, const occtl_point3_t **out_data, size_t *out_u_count, size_t *out_v_count)
occtl_status_t occtl_surface_as_sphere(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_spherical_surface_t *out_sphere)
occtl_status_t occtl_surface_create_from_boundary_curves(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_boundary_curves_create_info_t *info)
occtl_status_t occtl_surface_bspline_u_degree(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
occtl_status_t occtl_surface_bspline_poles(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_bspline_v_multiplicities(occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_create_interpolated(occtl_graph_t *graph, const occtl_surface_interpolated_info_t *info, occtl_rep_id_t *out_id)
enum occtl_surface_filling_style occtl_surface_filling_style_t
occtl_status_t occtl_surface_uv_of_point(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t point, double *out_u, double *out_v)
occtl_status_t occtl_surface_is_periodic(const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_periodic)
occtl_status_t occtl_surface_as_bspline(const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_surface_bspline_t *out)
occtl_status_t occtl_surface_translated(occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_vector3_t delta, occtl_rep_id_t *out_id)
void occtl_surface_bspline_init(occtl_surface_bspline_t *out)
occtl_status_t occtl_surface_create_cone(occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_conical_surface_t cone)
@ OCCTL_SURFACE_FILLING_STRETCH
Definition occtl_surfaces.h:1974
occtl_status_t occtl_surface_bspline_u_flat_knots(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_create_rectangular_trimmed(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_rectangular_trimmed_create_info_t *info)
occtl_status_t occtl_surface_bspline_weights(const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
occtl_status_t occtl_surface_create_offset(occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_offset_create_info_t *info)
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Directed line in 3D (origin + unit direction). Mirrors occtl_axis1_placement_t.
Definition geom.hpp:365
const occtl_axis1_placement_t & c_type() const noexcept
Borrows-it view of the underlying C value type.
Definition geom.hpp:379
3D point value type. Mirrors occtl_point3_t with STL-flavoured access.
Definition geom.hpp:82
const occtl_point3_t & c_type() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition geom.hpp:102
Aggregate inspection view of a B-spline surface.
Definition surfaces.hpp:899
Definition surfaces.hpp:846
Definition surfaces.hpp:859
Definition surfaces.hpp:851
Definition surfaces.hpp:841
3-by-4 affine transform value type. Mirrors occtl_transform_t.
Definition geom.hpp:442
const occtl_transform_t & c_type() const noexcept
Borrows-it view of the underlying C value type.
Definition geom.hpp:495
3D free-vector value type. Mirrors occtl_vector3_t.
Definition geom.hpp:184
const occtl_vector3_t & c_type() const noexcept
Borrows-it view of the underlying C value type.
Definition geom.hpp:204
Definition occtl_geom.h:111
Definition occtl_geom.h:949
Definition occtl_geom.h:926
Definition occtl_geom.h:916
Definition occtl_geom.h:937
Definition occtl_geom.h:962
Definition occtl_geom.h:76
Definition occtl_core.h:251
uint64_t bits
Definition occtl_core.h:252
Definition occtl_surfaces.h:1827
Definition occtl_surfaces.h:469
Definition occtl_surfaces.h:1987
const occtl_rep_id_t * curves
Definition occtl_surfaces.h:1990
occtl_surface_filling_style_t style
Definition occtl_surfaces.h:1992
size_t curve_count
Definition occtl_surfaces.h:1991
Definition occtl_surfaces.h:390
Definition occtl_surfaces.h:1512
int32_t is_v_periodic
Definition occtl_surfaces.h:1520
size_t v_flat_knot_count
Definition occtl_surfaces.h:1526
const int32_t * v_multiplicities
Definition occtl_surfaces.h:1540
int32_t is_rational
Definition occtl_surfaces.h:1518
const double * u_knots
Definition occtl_surfaces.h:1537
size_t v_knot_count
Definition occtl_surfaces.h:1524
const double * weights
Definition occtl_surfaces.h:1535
const double * v_flat_knots
Definition occtl_surfaces.h:1542
size_t u_knot_count
Definition occtl_surfaces.h:1523
int32_t u_degree
Definition occtl_surfaces.h:1516
const double * u_flat_knots
Definition occtl_surfaces.h:1541
const double * v_knots
Definition occtl_surfaces.h:1538
size_t u_flat_knot_count
Definition occtl_surfaces.h:1525
int32_t is_u_periodic
Definition occtl_surfaces.h:1519
const int32_t * u_multiplicities
Definition occtl_surfaces.h:1539
const occtl_point3_t * poles
Definition occtl_surfaces.h:1532
size_t u_pole_count
Definition occtl_surfaces.h:1521
size_t v_pole_count
Definition occtl_surfaces.h:1522
int32_t v_degree
Definition occtl_surfaces.h:1517
Definition occtl_surfaces.h:2119
const occtl_rep_id_t * u_curves
Definition occtl_surfaces.h:2122
size_t u_curve_count
Definition occtl_surfaces.h:2123
double tolerance
Definition occtl_surfaces.h:2126
const occtl_rep_id_t * v_curves
Definition occtl_surfaces.h:2124
size_t v_curve_count
Definition occtl_surfaces.h:2125
int32_t parallel
Definition occtl_surfaces.h:2127
Definition occtl_surfaces.h:222
Definition occtl_surfaces.h:2053
int32_t parallel
Definition occtl_surfaces.h:2061
size_t guide_count
Definition occtl_surfaces.h:2059
size_t profile_count
Definition occtl_surfaces.h:2057
double tolerance
Definition occtl_surfaces.h:2060
const occtl_rep_id_t * guides
Definition occtl_surfaces.h:2058
const occtl_rep_id_t * profiles
Definition occtl_surfaces.h:2056
Definition occtl_surfaces.h:1766
Definition occtl_surfaces.h:336
Definition occtl_surfaces.h:1898
Definition occtl_surfaces.h:274
Definition occtl_surfaces.h:167
Definition occtl_geom.h:84