From 1726963b74bea06d9e80d59957172cbfa93fd115 Mon Sep 17 00:00:00 2001 From: tfs_caslservice Date: Wed, 22 Jan 2025 13:15:13 -0500 Subject: [PATCH] sync: add changes from local folder --- ansys/api/geometry/v0/commands.proto | 37 ++++++- ansys/api/geometry/v0/edges.proto | 2 + ansys/api/geometry/v0/faces.proto | 2 + ansys/api/geometry/v0/models.proto | 133 +++++++++++++++++++++++- ansys/api/geometry/v0/repairtools.proto | 57 +++++++--- 5 files changed, 214 insertions(+), 17 deletions(-) diff --git a/ansys/api/geometry/v0/commands.proto b/ansys/api/geometry/v0/commands.proto index 00423f9..56d605c 100644 --- a/ansys/api/geometry/v0/commands.proto +++ b/ansys/api/geometry/v0/commands.proto @@ -157,7 +157,9 @@ service Commands{ rpc Shell(ShellRequest) returns (CommandResponse); - rpc Move(MoveRequest) returns (CommandResponse); + rpc RemoveFaces(RemoveFacesRequest) returns (CommandResponse); + + rpc MoveTranslate(MoveTranslateRequest) returns (CommandResponse); rpc MoveRotate(MoveRotateRequest) returns (CommandResponse); @@ -168,6 +170,10 @@ service Commands{ rpc SplitEdge(SplitEdgeRequest) returns (CommandResponse); rpc CreatePlane(CreatePlaneRequest) returns (CreatePlaneResponse); + + rpc EvaluateNurbsCurve(EvaluateNurbsCurveRequest) returns (CurveEvaluation); + + rpc ProjectPoint(ProjectPointRequest) returns (CurveEvaluation); } message CreatePlaneRequest { @@ -200,6 +206,11 @@ message ReplaceFaceRequest { } message ShellRequest { + ansys.api.dbu.v0.EntityIdentifier selection = 1; + double offset = 2; +} + +message RemoveFacesRequest { repeated ansys.api.dbu.v0.EntityIdentifier selection = 1; double offset = 2; } @@ -268,6 +279,8 @@ message PatternCommandResponse { message CombineIntersectBodiesRequest { repeated ansys.api.dbu.v0.EntityIdentifier target_selection = 1; repeated ansys.api.dbu.v0.EntityIdentifier tool_selection = 2; + optional bool keep_cutter = 3; + optional bool subtract_from_target = 4; } message CombineMergeBodiesRequest { @@ -753,7 +766,7 @@ message GetAssemblyResponse { map component_shared_topologies=8; } -message MoveRequest{ +message MoveTranslateRequest{ repeated ansys.api.dbu.v0.EntityIdentifier selection = 1; Direction direction = 2; double distance = 3; @@ -791,4 +804,24 @@ message SplitFaceRequest{ repeated TrimmedCurve split_curves=6; SplitFaceType split_type=7; SplitFaceParameterType parameter_type=8; +} + +message CreateNurbsFromControlPointsRequest{ + NurbsData nurbs_data = 1; + repeated ControlPoint control_points = 2; +} + +message NurbsCurveResponse { + ansys.api.dbu.v0.RequestResult result = 1; + NurbsCurve created_curve = 2; +} + +message EvaluateNurbsCurveRequest { + NurbsCurve curve = 1; + double parameter = 2; +} + +message ProjectPointRequest { + NurbsCurve curve = 1; + Point point = 2; } \ No newline at end of file diff --git a/ansys/api/geometry/v0/edges.proto b/ansys/api/geometry/v0/edges.proto index dc8e19f..89cd3fb 100644 --- a/ansys/api/geometry/v0/edges.proto +++ b/ansys/api/geometry/v0/edges.proto @@ -25,6 +25,8 @@ service Edges{ rpc GetInterval(ansys.api.dbu.v0.EntityIdentifier) returns (GetIntervalResponse); rpc GetCurve(ansys.api.dbu.v0.EntityIdentifier) returns (CurveGeometry); + + rpc GetBoundingBox(ansys.api.dbu.v0.EntityIdentifier) returns (Box); } message GetIntervalResponse { diff --git a/ansys/api/geometry/v0/faces.proto b/ansys/api/geometry/v0/faces.proto index 78249e0..a7ee683 100644 --- a/ansys/api/geometry/v0/faces.proto +++ b/ansys/api/geometry/v0/faces.proto @@ -35,6 +35,8 @@ service Faces{ rpc GetSurface(ansys.api.dbu.v0.EntityIdentifier) returns (Surface); rpc CreateIsoParamCurves(CreateIsoParamCurvesRequest) returns (CreateIsoParamCurvesResponse); + + rpc GetBoundingBox(ansys.api.dbu.v0.EntityIdentifier) returns (Box); } message CreateIsoParamCurvesRequest { diff --git a/ansys/api/geometry/v0/models.proto b/ansys/api/geometry/v0/models.proto index 31aa16c..ce46cf8 100644 --- a/ansys/api/geometry/v0/models.proto +++ b/ansys/api/geometry/v0/models.proto @@ -210,6 +210,7 @@ message Direction { message Box { Point min = 1; Point max = 2; + Point center = 3; } // @@ -313,7 +314,7 @@ message DuplicateCurveProblemArea { message SmallCurveProblemArea { int32 id = 1; - repeated string curve_point_monikers = 2; + repeated ansys.api.dbu.v0.EntityIdentifier curve_monikers = 2; } message AdjustSimplifyProblemArea { @@ -321,6 +322,12 @@ message AdjustSimplifyProblemArea { repeated string body_monikers = 2; } +message GapProblemArea { + int32 id = 1; + repeated ansys.api.dbu.v0.EntityIdentifier edge_monikers = 2; +} + + message RepairToolMessage { bool success = 1; repeated string created_bodies_monikers = 2; @@ -578,6 +585,49 @@ message Gap { double distance = 1; } +message NurbsCurve { + repeated ControlPoint control_points = 1; + NurbsData nurbs_data = 2; + bool is_rational = 3; + Parameterization parameterization = 4; +} + +message NurbsData{ + int32 degree = 1; + bool is_closed = 2; + bool is_periodic = 3; + repeated Knot knots = 4; + int32 order = 5; +} + +message Knot{ + int32 multiplicity = 1; + double parameter = 2; +} + +message ControlPoint { + Point position = 1; + double weight = 2; +} + +message Parameterization{ + ParameterizationBounds bounds = 1; + ParameterizationForm form = 2; +} + +message ParameterizationBounds { + bool infinite_start = 1; + double start = 2; + bool infinite_end = 3; + double end = 4; +} + +enum ParameterizationForm { + OPEN = 0; + CLOSED = 1; + PERIODIC = 2; +} + enum DraftSide { DRAFTSIDE_NO_SPLIT = 0; DRAFTSIDE_THIS = 1; @@ -613,4 +663,85 @@ enum PatternModificationType { PATTERNMODIFICATIONTYPE_SECONDARY_OVERALL_DIMENSION = 14; PATTERNMODIFICATIONTYPE_SECONDARY_SPACING_DIMENSION = 15; PATTERNMODIFICATIONTYPE_CIRCULAR_RADIUS = 16; +} + +enum InspectGeometryMessageType { + INSPECT_GEOMETRY_UNKNOWN = 0; + INSPECT_GEOMETRY_INFORMATION = 1; + INSPECT_GEOMETRY_WARNING = 2; + INSPECT_GEOMETRY_ERROR = 3; +} + +enum InspectGeometryLevel { + COMPLETE = 0; + VALIDATE = 1; + SANITY = 2; +} + +enum InspectGeometryMessageId { + INSPECT_GEOMETRY_ID_UNKNOWN= 0; + NONE= 1; + NOERROR= 2; + ERROR_BODYTOPOLOGY= 3; + ERROR_INSIDEOUTBODY= 4; + ERROR_GENERALBODY= 5; + ERROR_FACETOPOLOGY= 6; + ERROR_FACELOOP= 7; + ERROR_FACEGEOMETRY= 8; + ERROR_FACEEDGEGEOMETRY= 9; + ERROR_EDGEGEOMETRY= 10; + ERROR_EDGENONMANIFOLD= 11; + ERROR_EDGETOPOLOGY= 12; + ERROR_VERTEX= 13; + ERROR_VERTEXNONMANIFOLD= 14; + ERROR_MESHSELFINTERSECTS= 15; + WARNING_MULTIPLESHELLS= 16; + ERROR_MESHISOPEN= 17; + ERROR_MESHISNONMANIFOLD= 18; + UNKNOWN_FACE_ERROR= 19; + UNKNOWN_EDGE_ERROR= 20; + INTERNAL_ERROR= 21; + ERROR_FACEDISPLAY= 22; + INFO_SLIVERFACE= 23; + INFO_SLIVEREDGE= 24; + ERROR_FACEINTERSECTION= 25; + ERROR_FACESELFINTERSECTINGTOPOLOGY= 26; + ERROR_FACEFACEINTERSECTION= 27; + ERROR_EDGEOFFINEXACT= 28; + ERROR_EDGESELFINTERSECTINGTOPOLOGY= 29; + ERROR_MESHINCONSISTENTORIENTATION= 30; + WARNING_GEOMETRYNONG1= 31; + WARNING_GEOMETRYSELFINTERSECTS= 32; + WARNING_GEOMETRYCOLLAPSED= 33; + WARNING_LOOPISNOTCLOSEDPROPERLY= 34; + WARNING_CURVEISNOTCLOSEDPROPERLY= 35; + WARNING_SURFACEISNOTCLOSEDPROPERLY= 36; + WARNING_MESHHASFOLDOVERS= 37; + ERROR_MESH= 38; + ERROR_NOGEOMETRY= 39; + VERTEXOVERLAP = 40; +} + +message InspectGeometryOptions { + InspectGeometryLevel level = 1; + int32 max_number_of_issues = 2; + bool check_self_intersections = 3; + bool find_g1_discontinuities = 4; + double sliver_edge_tolerance = 5; + double sliver_face_tolerance = 6; +} + +message InspectGeometryResultIssue +{ + InspectGeometryMessageType message_type = 1; + InspectGeometryMessageId message_id = 2; + ansys.api.dbu.v0.EntityIdentifier entity_id = 3; + string entity_type = 4; + string message = 5; + optional double scalar_value = 6; +} + +message InspectGeometryResult { + ansys.api.dbu.v0.EntityIdentifier body_with_issues = 1; + repeated InspectGeometryResultIssue issues = 2; } \ No newline at end of file diff --git a/ansys/api/geometry/v0/repairtools.proto b/ansys/api/geometry/v0/repairtools.proto index 0e4f5f1..2cb2086 100644 --- a/ansys/api/geometry/v0/repairtools.proto +++ b/ansys/api/geometry/v0/repairtools.proto @@ -54,6 +54,10 @@ service RepairTools{ rpc FixGaps(FixGapsRequest) returns (FixGapsResponse); + rpc FindSmallCurves(FindSmallCurvesRequest) returns (FindSmallCurvesResponse); + + rpc FixSmallCurves(FixSmallCurvesRequest) returns (FixSmallCurvesResponse); + rpc FindCurveGaps(FindCurveGapsRequest) returns (FindCurveGapsResponse); rpc FixCurveGaps(FixCurveGapsRequest) returns (FixCurveGapsResponse); @@ -71,6 +75,18 @@ service RepairTools{ rpc FixAdjustSimplify(FixAdjustSimplifyRequest) returns (FixAdjustSimplifyResponse); rpc FitCurves(FitCurvesRequest) returns (FitCurvesResponse); + + rpc InspectGeometry(InspectGeometryRequest) returns (InspectGeometryResponse); + + rpc RepairGeometry(RepairGeometryRequest) returns (RepairGeometryResponse); + + rpc FindAndFixExtraEdges(FindExtraEdgesRequest) returns (RepairToolMessage); + + rpc FindAndFixSplitEdges(FindSplitEdgesRequest) returns (RepairToolMessage); + + rpc FindAndFixShortEdges(FindShortEdgesRequest) returns (RepairToolMessage); + + rpc FindAndSimplify(FindAdjustSimplifyRequest) returns (RepairToolMessage); } message FindInterferenceRequest{ @@ -243,27 +259,23 @@ message FixSmallFacesResponse{ } message FindGapsRequest{ - repeated string faces = 1; + repeated ansys.api.dbu.v0.EntityIdentifier bodies = 1; google.protobuf.DoubleValue angle=2; google.protobuf.DoubleValue distance = 3; - oneof method - { - google.protobuf.NullValue null = 4; - SolidifyFixMethodType data =5; - } - google.protobuf.BoolValue allow_multi_patch = 6; + optional SolidifyFixMethodType fix_method = 4; + google.protobuf.BoolValue allow_multi_patch = 5; } message FindGapsResponse{ - repeated ansys.api.geometry.v0.SplitEdgeProblemArea result = 1; + repeated ansys.api.geometry.v0.GapProblemArea result = 1; } message FixGapsRequest{ - google.protobuf.Int32Value problemarea_id = 1; + google.protobuf.Int32Value gap_problem_area_id = 1; } message FixGapsResponse{ - bool result = 1; + RepairToolMessage result = 1; } message FindCurveGapsRequest{ @@ -296,19 +308,19 @@ message FixDuplicateCurvesResponse{ } message FindSmallCurvesRequest{ - google.protobuf.DoubleValue distance = 1; + google.protobuf.DoubleValue max_curve_length = 1; } message FindSmallCurvesResponse{ - repeated ansys.api.geometry.v0.DuplicateCurveProblemArea result = 1; + repeated ansys.api.geometry.v0.SmallCurveProblemArea result = 1; } message FixSmallCurvesRequest{ - google.protobuf.Int32Value duplicate_curve_problem_area_id = 1; + google.protobuf.Int32Value small_curve_problem_area_id = 1; } message FixSmallCurvesResponse{ - bool result = 1; + RepairToolMessage result = 1; } message FindAdjustMergeFacesRequest{ @@ -362,4 +374,21 @@ message FitCurvesRequest{ message FitCurvesResponse{ RepairToolMessage result = 1; +} + +message InspectGeometryRequest { + repeated ansys.api.dbu.v0.EntityIdentifier bodies = 1; + optional InspectGeometryOptions options = 2; +} + +message InspectGeometryResponse { + repeated InspectGeometryResult issues_by_body = 1; +} + +message RepairGeometryRequest { + repeated ansys.api.dbu.v0.EntityIdentifier bodies = 1; +} + +message RepairGeometryResponse { + RepairToolMessage result = 1; } \ No newline at end of file