diff --git a/src/topologicpy/Graph.py b/src/topologicpy/Graph.py index 92f3745..7a94b49 100644 --- a/src/topologicpy/Graph.py +++ b/src/topologicpy/Graph.py @@ -7845,6 +7845,7 @@ def Show(graph, sagitta = 0, absolute = False, sides = 8, + angle = 0, vertexColor="black", vertexSize=6, vertexLabelKey=None, @@ -7893,6 +7894,8 @@ def Show(graph, For example, if the length of the edge is 10, the sagitta is set to 0.5, and absolute is set to False, the sagitta length will be 5. The default is True. sides : int , optional The number of sides of the arc. The default is 8. + angle : float, optional + An additional angle in degrees to rotate arcs (where sagitta is more than 0). The default is 0. vertexColor : str , optional The desired color of the output vertices. This can be any plotly color string and may be specified as: - A hex string (e.g. '#ff0000') @@ -7994,7 +7997,7 @@ def Show(graph, print("Graph.Show - Error: The input graph is not a valid graph. Returning None.") return None - data= Plotly.DataByGraph(graph, sagitta=sagitta, absolute=absolute, sides=sides, vertexColor=vertexColor, vertexSize=vertexSize, vertexLabelKey=vertexLabelKey, vertexGroupKey=vertexGroupKey, vertexGroups=vertexGroups, showVertices=showVertices, showVertexLabels=showVertexLabels, showVertexLegend=showVertexLegend, edgeColor=edgeColor, edgeWidth=edgeWidth, edgeLabelKey=edgeLabelKey, edgeGroupKey=edgeGroupKey, edgeGroups=edgeGroups, showEdges=showEdges, showEdgeLabels=showEdgeLabels, showEdgeLegend=showEdgeLegend, colorScale=colorScale, silent=silent) + data= Plotly.DataByGraph(graph, sagitta=sagitta, absolute=absolute, sides=sides, angle=angle, vertexColor=vertexColor, vertexSize=vertexSize, vertexLabelKey=vertexLabelKey, vertexGroupKey=vertexGroupKey, vertexGroups=vertexGroups, showVertices=showVertices, showVertexLabels=showVertexLabels, showVertexLegend=showVertexLegend, edgeColor=edgeColor, edgeWidth=edgeWidth, edgeLabelKey=edgeLabelKey, edgeGroupKey=edgeGroupKey, edgeGroups=edgeGroups, showEdges=showEdges, showEdgeLabels=showEdgeLabels, showEdgeLegend=showEdgeLegend, colorScale=colorScale, silent=silent) fig = Plotly.FigureByData(data, width=width, height=height, xAxis=xAxis, yAxis=yAxis, zAxis=zAxis, axisSize=axisSize, backgroundColor=backgroundColor, marginLeft=marginLeft, marginRight=marginRight, marginTop=marginTop, marginBottom=marginBottom, tolerance=tolerance) Plotly.Show(fig, renderer=renderer, camera=camera, center=center, up=up, projection=projection) diff --git a/src/topologicpy/Plotly.py b/src/topologicpy/Plotly.py index 07c899c..5d09de1 100644 --- a/src/topologicpy/Plotly.py +++ b/src/topologicpy/Plotly.py @@ -276,6 +276,7 @@ def DataByGraph(graph, sagitta: float = 0, absolute: bool = False, sides: int = 8, + angle: float = 0, vertexColor: str = "black", vertexSize: float = 6, vertexLabelKey: str = None, @@ -454,6 +455,9 @@ def DataByGraph(graph, d = Topology.Dictionary(edge) arc = Wire.ArcByEdge(edge, sagitta=sagitta, absolute=absolute, sides=sides, close=False, silent=silent) if Topology.IsInstance(arc, "Wire"): + if not angle == 0: + direc = Edge.Direction(edge) + arc = Topology.Rotate(arc, origin=Topology.Centroid(edge), axis=direc, angle=angle) arc_edges = Topology.Edges(arc) for arc_edge in arc_edges: arc_edge = Topology.SetDictionary(arc_edge, d, silent=True) diff --git a/src/topologicpy/version.py b/src/topologicpy/version.py index 9fd6112..29db02c 100644 --- a/src/topologicpy/version.py +++ b/src/topologicpy/version.py @@ -1 +1 @@ -__version__ = '0.7.68' +__version__ = '0.7.69'