Skip to content

Commit b8ac617

Browse files
Merge branch 'main' into release/0.4
2 parents b9dc610 + 1bea2f7 commit b8ac617

File tree

7 files changed

+216
-19
lines changed

7 files changed

+216
-19
lines changed

ansys/api/geometry/v0/commands.proto

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ service Commands{
157157

158158
rpc Shell(ShellRequest) returns (CommandResponse);
159159

160-
rpc Move(MoveRequest) returns (CommandResponse);
160+
rpc RemoveFaces(RemoveFacesRequest) returns (CommandResponse);
161+
162+
rpc MoveTranslate(MoveTranslateRequest) returns (CommandResponse);
161163

162164
rpc MoveRotate(MoveRotateRequest) returns (CommandResponse);
163165

@@ -168,6 +170,10 @@ service Commands{
168170
rpc SplitEdge(SplitEdgeRequest) returns (CommandResponse);
169171

170172
rpc CreatePlane(CreatePlaneRequest) returns (CreatePlaneResponse);
173+
174+
rpc EvaluateNurbsCurve(EvaluateNurbsCurveRequest) returns (CurveEvaluation);
175+
176+
rpc ProjectPoint(ProjectPointRequest) returns (CurveEvaluation);
171177
}
172178

173179
message CreatePlaneRequest {
@@ -200,6 +206,11 @@ message ReplaceFaceRequest {
200206
}
201207

202208
message ShellRequest {
209+
ansys.api.dbu.v0.EntityIdentifier selection = 1;
210+
double offset = 2;
211+
}
212+
213+
message RemoveFacesRequest {
203214
repeated ansys.api.dbu.v0.EntityIdentifier selection = 1;
204215
double offset = 2;
205216
}
@@ -268,6 +279,8 @@ message PatternCommandResponse {
268279
message CombineIntersectBodiesRequest {
269280
repeated ansys.api.dbu.v0.EntityIdentifier target_selection = 1;
270281
repeated ansys.api.dbu.v0.EntityIdentifier tool_selection = 2;
282+
optional bool keep_cutter = 3;
283+
optional bool subtract_from_target = 4;
271284
}
272285

273286
message CombineMergeBodiesRequest {
@@ -753,7 +766,7 @@ message GetAssemblyResponse {
753766
map <string, int32> component_shared_topologies=8;
754767
}
755768

756-
message MoveRequest{
769+
message MoveTranslateRequest{
757770
repeated ansys.api.dbu.v0.EntityIdentifier selection = 1;
758771
Direction direction = 2;
759772
double distance = 3;
@@ -791,4 +804,24 @@ message SplitFaceRequest{
791804
repeated TrimmedCurve split_curves=6;
792805
SplitFaceType split_type=7;
793806
SplitFaceParameterType parameter_type=8;
807+
}
808+
809+
message CreateNurbsFromControlPointsRequest{
810+
NurbsData nurbs_data = 1;
811+
repeated ControlPoint control_points = 2;
812+
}
813+
814+
message NurbsCurveResponse {
815+
ansys.api.dbu.v0.RequestResult result = 1;
816+
NurbsCurve created_curve = 2;
817+
}
818+
819+
message EvaluateNurbsCurveRequest {
820+
NurbsCurve curve = 1;
821+
double parameter = 2;
822+
}
823+
824+
message ProjectPointRequest {
825+
NurbsCurve curve = 1;
826+
Point point = 2;
794827
}

ansys/api/geometry/v0/edges.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ service Edges{
2525
rpc GetInterval(ansys.api.dbu.v0.EntityIdentifier) returns (GetIntervalResponse);
2626

2727
rpc GetCurve(ansys.api.dbu.v0.EntityIdentifier) returns (CurveGeometry);
28+
29+
rpc GetBoundingBox(ansys.api.dbu.v0.EntityIdentifier) returns (Box);
2830
}
2931

3032
message GetIntervalResponse {

ansys/api/geometry/v0/faces.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ service Faces{
3535
rpc GetSurface(ansys.api.dbu.v0.EntityIdentifier) returns (Surface);
3636

3737
rpc CreateIsoParamCurves(CreateIsoParamCurvesRequest) returns (CreateIsoParamCurvesResponse);
38+
39+
rpc GetBoundingBox(ansys.api.dbu.v0.EntityIdentifier) returns (Box);
3840
}
3941

4042
message CreateIsoParamCurvesRequest {

ansys/api/geometry/v0/models.proto

Lines changed: 132 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ message Direction {
210210
message Box {
211211
Point min = 1;
212212
Point max = 2;
213+
Point center = 3;
213214
}
214215

215216
//
@@ -313,14 +314,20 @@ message DuplicateCurveProblemArea {
313314

314315
message SmallCurveProblemArea {
315316
int32 id = 1;
316-
repeated string curve_point_monikers = 2;
317+
repeated ansys.api.dbu.v0.EntityIdentifier curve_monikers = 2;
317318
}
318319

319320
message AdjustSimplifyProblemArea {
320321
int32 id = 1;
321322
repeated string body_monikers = 2;
322323
}
323324

325+
message GapProblemArea {
326+
int32 id = 1;
327+
repeated ansys.api.dbu.v0.EntityIdentifier edge_monikers = 2;
328+
}
329+
330+
324331
message RepairToolMessage {
325332
bool success = 1;
326333
repeated string created_bodies_monikers = 2;
@@ -578,6 +585,49 @@ message Gap {
578585
double distance = 1;
579586
}
580587

588+
message NurbsCurve {
589+
repeated ControlPoint control_points = 1;
590+
NurbsData nurbs_data = 2;
591+
bool is_rational = 3;
592+
Parameterization parameterization = 4;
593+
}
594+
595+
message NurbsData{
596+
int32 degree = 1;
597+
bool is_closed = 2;
598+
bool is_periodic = 3;
599+
repeated Knot knots = 4;
600+
int32 order = 5;
601+
}
602+
603+
message Knot{
604+
int32 multiplicity = 1;
605+
double parameter = 2;
606+
}
607+
608+
message ControlPoint {
609+
Point position = 1;
610+
double weight = 2;
611+
}
612+
613+
message Parameterization{
614+
ParameterizationBounds bounds = 1;
615+
ParameterizationForm form = 2;
616+
}
617+
618+
message ParameterizationBounds {
619+
bool infinite_start = 1;
620+
double start = 2;
621+
bool infinite_end = 3;
622+
double end = 4;
623+
}
624+
625+
enum ParameterizationForm {
626+
OPEN = 0;
627+
CLOSED = 1;
628+
PERIODIC = 2;
629+
}
630+
581631
enum DraftSide {
582632
DRAFTSIDE_NO_SPLIT = 0;
583633
DRAFTSIDE_THIS = 1;
@@ -613,4 +663,85 @@ enum PatternModificationType {
613663
PATTERNMODIFICATIONTYPE_SECONDARY_OVERALL_DIMENSION = 14;
614664
PATTERNMODIFICATIONTYPE_SECONDARY_SPACING_DIMENSION = 15;
615665
PATTERNMODIFICATIONTYPE_CIRCULAR_RADIUS = 16;
666+
}
667+
668+
enum InspectGeometryMessageType {
669+
INSPECT_GEOMETRY_UNKNOWN = 0;
670+
INSPECT_GEOMETRY_INFORMATION = 1;
671+
INSPECT_GEOMETRY_WARNING = 2;
672+
INSPECT_GEOMETRY_ERROR = 3;
673+
}
674+
675+
enum InspectGeometryLevel {
676+
COMPLETE = 0;
677+
VALIDATE = 1;
678+
SANITY = 2;
679+
}
680+
681+
enum InspectGeometryMessageId {
682+
INSPECT_GEOMETRY_ID_UNKNOWN= 0;
683+
NONE= 1;
684+
NOERROR= 2;
685+
ERROR_BODYTOPOLOGY= 3;
686+
ERROR_INSIDEOUTBODY= 4;
687+
ERROR_GENERALBODY= 5;
688+
ERROR_FACETOPOLOGY= 6;
689+
ERROR_FACELOOP= 7;
690+
ERROR_FACEGEOMETRY= 8;
691+
ERROR_FACEEDGEGEOMETRY= 9;
692+
ERROR_EDGEGEOMETRY= 10;
693+
ERROR_EDGENONMANIFOLD= 11;
694+
ERROR_EDGETOPOLOGY= 12;
695+
ERROR_VERTEX= 13;
696+
ERROR_VERTEXNONMANIFOLD= 14;
697+
ERROR_MESHSELFINTERSECTS= 15;
698+
WARNING_MULTIPLESHELLS= 16;
699+
ERROR_MESHISOPEN= 17;
700+
ERROR_MESHISNONMANIFOLD= 18;
701+
UNKNOWN_FACE_ERROR= 19;
702+
UNKNOWN_EDGE_ERROR= 20;
703+
INTERNAL_ERROR= 21;
704+
ERROR_FACEDISPLAY= 22;
705+
INFO_SLIVERFACE= 23;
706+
INFO_SLIVEREDGE= 24;
707+
ERROR_FACEINTERSECTION= 25;
708+
ERROR_FACESELFINTERSECTINGTOPOLOGY= 26;
709+
ERROR_FACEFACEINTERSECTION= 27;
710+
ERROR_EDGEOFFINEXACT= 28;
711+
ERROR_EDGESELFINTERSECTINGTOPOLOGY= 29;
712+
ERROR_MESHINCONSISTENTORIENTATION= 30;
713+
WARNING_GEOMETRYNONG1= 31;
714+
WARNING_GEOMETRYSELFINTERSECTS= 32;
715+
WARNING_GEOMETRYCOLLAPSED= 33;
716+
WARNING_LOOPISNOTCLOSEDPROPERLY= 34;
717+
WARNING_CURVEISNOTCLOSEDPROPERLY= 35;
718+
WARNING_SURFACEISNOTCLOSEDPROPERLY= 36;
719+
WARNING_MESHHASFOLDOVERS= 37;
720+
ERROR_MESH= 38;
721+
ERROR_NOGEOMETRY= 39;
722+
VERTEXOVERLAP = 40;
723+
}
724+
725+
message InspectGeometryOptions {
726+
InspectGeometryLevel level = 1;
727+
int32 max_number_of_issues = 2;
728+
bool check_self_intersections = 3;
729+
bool find_g1_discontinuities = 4;
730+
double sliver_edge_tolerance = 5;
731+
double sliver_face_tolerance = 6;
732+
}
733+
734+
message InspectGeometryResultIssue
735+
{
736+
InspectGeometryMessageType message_type = 1;
737+
InspectGeometryMessageId message_id = 2;
738+
ansys.api.dbu.v0.EntityIdentifier entity_id = 3;
739+
string entity_type = 4;
740+
string message = 5;
741+
optional double scalar_value = 6;
742+
}
743+
744+
message InspectGeometryResult {
745+
ansys.api.dbu.v0.EntityIdentifier body_with_issues = 1;
746+
repeated InspectGeometryResultIssue issues = 2;
616747
}

ansys/api/geometry/v0/repairtools.proto

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ service RepairTools{
5454

5555
rpc FixGaps(FixGapsRequest) returns (FixGapsResponse);
5656

57+
rpc FindSmallCurves(FindSmallCurvesRequest) returns (FindSmallCurvesResponse);
58+
59+
rpc FixSmallCurves(FixSmallCurvesRequest) returns (FixSmallCurvesResponse);
60+
5761
rpc FindCurveGaps(FindCurveGapsRequest) returns (FindCurveGapsResponse);
5862

5963
rpc FixCurveGaps(FixCurveGapsRequest) returns (FixCurveGapsResponse);
@@ -71,6 +75,18 @@ service RepairTools{
7175
rpc FixAdjustSimplify(FixAdjustSimplifyRequest) returns (FixAdjustSimplifyResponse);
7276

7377
rpc FitCurves(FitCurvesRequest) returns (FitCurvesResponse);
78+
79+
rpc InspectGeometry(InspectGeometryRequest) returns (InspectGeometryResponse);
80+
81+
rpc RepairGeometry(RepairGeometryRequest) returns (RepairGeometryResponse);
82+
83+
rpc FindAndFixExtraEdges(FindExtraEdgesRequest) returns (RepairToolMessage);
84+
85+
rpc FindAndFixSplitEdges(FindSplitEdgesRequest) returns (RepairToolMessage);
86+
87+
rpc FindAndFixShortEdges(FindShortEdgesRequest) returns (RepairToolMessage);
88+
89+
rpc FindAndSimplify(FindAdjustSimplifyRequest) returns (RepairToolMessage);
7490
}
7591

7692
message FindInterferenceRequest{
@@ -243,27 +259,23 @@ message FixSmallFacesResponse{
243259
}
244260

245261
message FindGapsRequest{
246-
repeated string faces = 1;
262+
repeated ansys.api.dbu.v0.EntityIdentifier bodies = 1;
247263
google.protobuf.DoubleValue angle=2;
248264
google.protobuf.DoubleValue distance = 3;
249-
oneof method
250-
{
251-
google.protobuf.NullValue null = 4;
252-
SolidifyFixMethodType data =5;
253-
}
254-
google.protobuf.BoolValue allow_multi_patch = 6;
265+
optional SolidifyFixMethodType fix_method = 4;
266+
google.protobuf.BoolValue allow_multi_patch = 5;
255267
}
256268

257269
message FindGapsResponse{
258-
repeated ansys.api.geometry.v0.SplitEdgeProblemArea result = 1;
270+
repeated ansys.api.geometry.v0.GapProblemArea result = 1;
259271
}
260272

261273
message FixGapsRequest{
262-
google.protobuf.Int32Value problemarea_id = 1;
274+
google.protobuf.Int32Value gap_problem_area_id = 1;
263275
}
264276

265277
message FixGapsResponse{
266-
bool result = 1;
278+
RepairToolMessage result = 1;
267279
}
268280

269281
message FindCurveGapsRequest{
@@ -296,19 +308,19 @@ message FixDuplicateCurvesResponse{
296308
}
297309

298310
message FindSmallCurvesRequest{
299-
google.protobuf.DoubleValue distance = 1;
311+
google.protobuf.DoubleValue max_curve_length = 1;
300312
}
301313

302314
message FindSmallCurvesResponse{
303-
repeated ansys.api.geometry.v0.DuplicateCurveProblemArea result = 1;
315+
repeated ansys.api.geometry.v0.SmallCurveProblemArea result = 1;
304316
}
305317

306318
message FixSmallCurvesRequest{
307-
google.protobuf.Int32Value duplicate_curve_problem_area_id = 1;
319+
google.protobuf.Int32Value small_curve_problem_area_id = 1;
308320
}
309321

310322
message FixSmallCurvesResponse{
311-
bool result = 1;
323+
RepairToolMessage result = 1;
312324
}
313325

314326
message FindAdjustMergeFacesRequest{
@@ -362,4 +374,21 @@ message FitCurvesRequest{
362374

363375
message FitCurvesResponse{
364376
RepairToolMessage result = 1;
377+
}
378+
379+
message InspectGeometryRequest {
380+
repeated ansys.api.dbu.v0.EntityIdentifier bodies = 1;
381+
optional InspectGeometryOptions options = 2;
382+
}
383+
384+
message InspectGeometryResponse {
385+
repeated InspectGeometryResult issues_by_body = 1;
386+
}
387+
388+
message RepairGeometryRequest {
389+
repeated ansys.api.dbu.v0.EntityIdentifier bodies = 1;
390+
}
391+
392+
message RepairGeometryResponse {
393+
RepairToolMessage result = 1;
365394
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ requires = [
33
"setuptools >= 42.0.0",
44
"wheel",
55
"ansys_tools_protoc_helper>=0.4.0",
6-
"ansys-api-dbu==0.3.10",
6+
"ansys-api-dbu==0.3.11",
77
]
88
build-backend = "setuptools.build_meta:__legacy__"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
url=f"https://github.com/ansys/{package_name}",
4040
license="MIT",
4141
python_requires=">=3.10",
42-
install_requires=["grpcio~=1.44", "protobuf>=3.19,<6", "ansys-api-dbu==0.3.10"],
42+
install_requires=["grpcio~=1.44", "protobuf>=3.19,<6", "ansys-api-dbu==0.3.11"],
4343
packages=setuptools.find_namespace_packages(".", include=("ansys.*",)),
4444
package_data={
4545
"": ["*.proto", "*.pyi", "py.typed", "VERSION"],

0 commit comments

Comments
 (0)