Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Odom <clockmender@icloud.com>2020-02-13 11:28:29 +0300
committerRune Morling <ermo.blender.org@spammesenseless.net>2020-03-28 20:55:24 +0300
commit1d5837400d0bc55862b082065b3594996aa5f4d4 (patch)
treeb71e7413a549a0c9e0bbb710edf80ba64a94dd24 /precision_drawing_tools/pdt_menus.py
parent9d8aeccfe3757dbb910f61cec7ec29446d880ad9 (diff)
PDT: Add user-requested Tangent Functions (new feature)
This Branch is WIP, still in development and not yet suitable for a release. This process will add the ability to draw tangents from a point to an arc, or circle. It will also add the ability to draw tangents, both inner and outer, between two arcs. Arc centres and radii can be manually input into the UI, or set from three vertices that lie on an imaginary arc. Tangent functions have their own PDT Sub-menu. This commit only works in Front view, to get the maths right, later commits will expand this into any view orientation, using existing PDT code. This commit does not contain DocStrings for the new pdt_tangent.py file, these will also follow in a later commit. It is recommended that this commit is not used in a production environment. Once complete, a new version Branch will be added, at this point the code will reach Alpha status and be appropriate for extensive user testing.
Diffstat (limited to 'precision_drawing_tools/pdt_menus.py')
-rw-r--r--precision_drawing_tools/pdt_menus.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/precision_drawing_tools/pdt_menus.py b/precision_drawing_tools/pdt_menus.py
index 61444d60..1632730c 100644
--- a/precision_drawing_tools/pdt_menus.py
+++ b/precision_drawing_tools/pdt_menus.py
@@ -414,3 +414,42 @@ class PDT_PT_PanelCommandLine(Panel):
row.operator("pdt.command_rerun", text="", icon="LOOP_BACK")
row = layout.row()
row.prop(pdt_pg, "maths_output", text="Maths Output")
+
+class PDT_PT_PanelTangent(Panel):
+ bl_idname = "PDT_PT_PanelTangent"
+ bl_label = "PDT Tangents"
+ bl_space_type = "VIEW_3D"
+ bl_region_type = "UI"
+ bl_category = "PDT"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self,context):
+ layout = self.layout
+ pdt_pg = context.scene.pdt_pg
+ # First Centre & Radius
+ row = layout.row()
+ split = row.split(factor=0.35, align=True)
+ split.label(text="Centre 1")
+ split.prop(pdt_pg, "tangent_point0", text="")
+ row = layout.row()
+ split = row.split(factor=0.45, align=False)
+ split.operator("pdt.tangentset1", text="Set From Arc")
+ split.prop(pdt_pg, "tangent_radius0", text="")
+
+ # Second Centre & Radius
+ row = layout.row()
+ split = row.split(factor=0.35, align=True)
+ split.label(text="Centre 2")
+ split.prop(pdt_pg, "tangent_point1", text="")
+ row = layout.row()
+ split = row.split(factor=0.45, align=False)
+ split.operator("pdt.tangentset2", text="Set From Arc")
+ split.prop(pdt_pg, "tangent_radius1", text="")
+
+ row = layout.row()
+ row.operator("pdt.tangentoperate", text="Execute", icon="NONE")
+ row.prop(pdt_pg, "tangent_from_point", text="From Point")
+ row = layout.row()
+ split = row.split(factor=0.35, align=True)
+ split.label(text="Tan Point")
+ split.prop(pdt_pg, "tangent_point2", text="")