News:

 

Topic: Spline Tangents on "line list"  (Read 16740 times)

0 Members and 1 Guest are viewing this topic.

  • No avatar
  • Posts: 2103
  • Polygon
July 28, 2014, 03:23:10 pm
Hi JTenebrous,

+1 to this, for sure.  To use Steve's exact  example, I'm constantly adding bolts/rivet heads to models (I usually do this in CAD software at the moment)... so having the spline vectors working correctly on paths created from an inset, etc. would be very useful in NVIL.

I would suggest you take a look at the latest build on this thread.

I have been making tests on various objects, all a lot more complex than the examples I have shown on thread, and now not seeing any issues.

  • No avatar
  • Posts: 130
  • Spline
July 28, 2014, 05:11:01 pm
Thanks, I'll grab it now... I've had a read over your/Istonia's posts in this thread over the last few weeks and am looking forward to trying out the resulting improvements.

  • No avatar
  • Posts: 2103
  • Polygon
July 29, 2014, 08:39:03 pm
Hi IStonia,

I see from the later dev builds you have locked out the rotation of the tangent handles while using "Tangent > Twist". I think that is correct to do, as the user should only be adjusting flow while in that mode. (I am wondering if the option "Twist" should actually be called "Flow", as there is now the option to "Lock Flow")

The problem is when attempting to rotate the tangent handles. I see that while using the "Tangent" tool, you can change to rotate manipulator, then rotate the handle(s), however, there is a problem when the manipulator is set to "Orientation > Selection", as although most of the time the rotation around "y" can be correct, the rotation around "Z" is problematic.

Here is a pic of a simple 4 point planer spline. Tangent tool enabled, with rotation manipulator set to "orientation > Selection"



Using the rotate manipulator, I attempt to rotate around the selections "Z" axis, but the resulting rotation is incorrect.



Similar problem with "Translate" manipulator.
(Note: I did check while flow was unlocked and locked, but same issue.
While in spline vertex mode, I can rotate the vertex tangency using rotate manipulator(with orientation > Selection) and it works correctly while Flow is locked. But (IMHO) that would be strange workflow having to exit tangent tool to rotate tangent handles correctly to selection.)

Changing manipulator orientation to world/object, there is not such a problem, but while the manipulator is set in that orientation you cannot make correct rotation direction to tangent.

« Last Edit: July 29, 2014, 08:55:15 pm by steve »

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon

  • No avatar
  • Posts: 2103
  • Polygon
July 30, 2014, 12:31:27 pm
Hi IStonia,

Many thanks for the quick update.

I am seeing some minor inconsistencies with some functions and "Flow", but not sure yet if a problem(as only seen if certain circumstances), I need to test more, and will explain that later.

One problem I do see at the moment, is that "Add" is causing issue, as the spline vertex are not adopting underlying geometry snapping for flow/tangency correctly, it appears the flow is rotated 90 deg, and the tangency is auto naturalized. Only when the snap point is to close the spline is the flow/tangency correct(to snapping).
NOTE: That was testing while creating a 3d spline. 2d splines do not appear to have similar issue.
I was going to create pics to show example, but now found an issue with not being able to snap to "polygon_center" in other view ports(after changing to multi_view). But is working again after restarting Nvil.

I need to go into city center, so will continue testing when I get back.


« Last Edit: July 30, 2014, 12:56:27 pm by steve »

  • No avatar
  • Posts: 2103
  • Polygon
July 30, 2014, 03:46:07 pm
Hi IStonia,

Looking at "Spline > Add".

You have now added the ability to use MMB/RMB functions for in/out tangency control, but it is not very useful currently if tangency (user settings) is wanted across [control] points.

As I mentioned in earlier post, when creating a "Spline" using the added function of MMB/RMB, they need to be made in specific order. You cannot use MMB(for "In" tangent for new point) without first using RMB(for "Out" tangent of previous point).
As simple example:-
I have open spline:-


Enable "Add"
which gives me an extension that is tangent to end of spline. The point under cursor is floating and auto_naturalizing.


For that floating point, I cannot use MMB to set its "In" tangent. I have choice of:- RMB to create out tangent to last point, which is currently fixed/tangent, and in doing so may probably cause "Cusp" and break tangency(certainly if a 3d spline), or I can LMB which creates auto_naturalized point, and I am then left in the same situation, with a choice of LMB/RMB. The only way I could get it to work in a way for me to control tangency, would be if snapping to geometry works (spline point adopting underlying tangency), and creating geometry at the spline end_point(where the spline is added) with correct distance for tangent handle, so I can use RMB to create the out_tangent correctly for that point.



------------------------------------

Using "Add" snapping to geometry.

This worked in previous build, but now appears broken.

Spline created snapping to faces of box(s).



Using "Add" to snap to faces of other box(s), then snapping to end of spline to close:-



The "Flow" and "Tangency" (of the spline points) at snap points made by "Add" are not correct to geometry. Only the snap point to close spline is correct.


------------------------------
The problem I mentioned with not being able to snap to faces in other view-ports after changing viewport layout (to multi_view), that is an issue, but appears to be unpredictable. When the problem happens, "Reset View" does not help. I need to restart Nvil with multi_view already in place.
Do not know how long that may of been an issue, I do not normally use more than a single view layout.


 

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon

  • No avatar
  • Posts: 2103
  • Polygon
July 31, 2014, 12:56:07 pm
Hi IStonia,

Looking at "Add".

It is now possible to use MMB to control first (floating) points "In" tangent after enabling "Add". That is (IMHO) much better for user control. Appears to be working well on first tests. Excellent, many thanks.

There is still the issue of "Add" not using snapping point [geometry normal] for spline tangency, although "Flow" does appear to be correct. [To add:- As "Flow" is set correctly, and by default the "flow" is locked, there is only a need to "Naturalize" the spline to set the tangent handle direction to geometry. So not a major issue).


--------------------------

I will start re-testing the other spline tools/functions.

---------------------------

I was having another look at the issue I mentioned with changing Viewport layout to multi views, then having issues with face snapping. I have not been able to replicate that issue with this build.



« Last Edit: August 01, 2014, 12:25:36 am by steve »

  • No avatar
  • Posts: 2103
  • Polygon
August 01, 2014, 12:07:05 am
Hi IStonia,

I need to ask about the implementation you made with spline creation using the added functions with the MMB/RMB, as the way I am seeing this, it can be very difficult to be able to create a smooth curve, unless the curve is to only have 2 points.
Was it your intention for the MMB/RMB only to be used for 2 point splines? (if it was, you can ignore the rest of this post)


--------------------------------------------
If creating a spline with more than 2 points using MMB/RMB, the splines tangency can too easily be made as cusp.

Quick example:-

I start the spline with LMB, set "out" tangent with RMB. The "in" tangent to next spline point is auto created. I can change the start of the "in" tangent(for next spline point if required using MMB), but will leave as default, I then LMB to create next spline point. I LMB to create a 3rd spline point as shown.

Looking at the spline (before pressing enter to finish the spline), it appears that the 2nd point created will have tangent handles set as symmetric or asymmetric



but after pressing enter to finish spline, the spline changes and the tangency is "Cusp", so not smooth.



Another quick example, is while creating a spline, I make a RMB for control of "out" tangent.



The spline point from where I have made the "out" tangent, its tangent handles are made "cusp"



So to create a smooth spline with more than 2 points using MMB/RMB, I would need to manually set both "in" and "out" tangent handles on every spline point to attempt to keep spline smooth.



  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
August 01, 2014, 09:13:51 am
Try this
http://www.digitalfossils.com/Download/NVil-Aug-01-14.rar


There is still the issue of "Add" not using snapping point [geometry normal] for spline tangency, although "Flow" does appear to be correct. [To add:- As "Flow" is set correctly, and by default the "flow" is locked, there is only a need to "Naturalize" the spline to set the tangent handle direction to geometry. So not a major issue).

Naturalizing of these kind of spline points needs the information of the adjacent points. So during spline creation, it is not possible to get correct result. It is better to naturalize the spline after the creation or points been added/deleted. It might also be needed to do it a couple of times. For the "Spline" tool, if no line type segment been defined and no tangent control points added, the program will naturalize the spline automatically when the tool is closed.


Edit: I uploaded the wrong file. I have renewed it. Please re-download.
« Last Edit: August 01, 2014, 10:07:06 am by IStonia »

  • No avatar
  • Posts: 2103
  • Polygon
August 01, 2014, 01:26:44 pm
Hi IStonia,

On quick test with MMB/RMB (creating spline examples as shown in my last post), the tangency now appears to be correct, but on completion of the spline, pressing "Enter" or "Close"(on spline tool popup), causes "Unhandled exception"


I have also checked with a new config with same result.

Code: [Select]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at DigitalFossil.AnimationDesign.AnimationDesignGraphicWindow.ModelDesigner.CreateCurveOp.Exit()
   at DigitalFossil.AnimationDesign.AnimationDesignGraphicWindow.ModelDesigner.CreateCurveOp.OnAppFormKeyDown(Object sender, KeyEventArgs e)
   at DigitalFossil.AnimationDesign.AnimationDesignForm.OnKeyDown(Object sender, KeyEventArgs e)
   at DigitalFossil.KeyboardControler.Form_KeyDown(Object sender, KeyEventArgs e)
   at DigitalFossil.AnimationDesign.AnimationDesignForm.OnDisableKeyCapturedDown(Keys key)
   at DigitalFossil.AnimationDesign.AnimationDesignForm.ProcessCmdKeyCore(Message& msg, Keys keyData)
   at DigitalFossil.AnimationDesign.AnimationDesignForm.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
NVil 1.0
    Assembly Version: 2.3.5326.41398
    Win32 Version: 2.3.5326.41398
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/NVil%201.0.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CharacterClasses
    Assembly Version: 2.3.5326.41380
    Win32 Version: 2.3.5326.41380
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/CharacterClasses.DLL
----------------------------------------
SlimDX
    Assembly Version: 2.0.13.43
    Win32 Version:
    CodeBase: file:///C:/Windows/assembly/GAC_64/SlimDX/2.0.13.43__b1b0c32fd1ffe4f9/SlimDX.dll
----------------------------------------
WorkShop
    Assembly Version: 2.3.5326.41390
    Win32 Version: 2.3.5326.41390
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/WorkShop.DLL
----------------------------------------
BasicD3DClasses
    Assembly Version: 2.3.5326.41382
    Win32 Version: 2.3.5326.41382
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/BasicD3DClasses.DLL
----------------------------------------
DevExpress.XtraBars.v10.2
    Assembly Version: 10.2.4.0
    Win32 Version: 10.2.4.0
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/DevExpress.XtraBars.v10.2.DLL
----------------------------------------
DevExpress.Utils.v10.2
    Assembly Version: 10.2.4.0
    Win32 Version: 10.2.4.0
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/DevExpress.Utils.v10.2.DLL
----------------------------------------
DevExpress.Data.v10.2
    Assembly Version: 10.2.4.0
    Win32 Version: 10.2.4.0
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/DevExpress.Data.v10.2.DLL
----------------------------------------
DevExpress.XtraEditors.v10.2
    Assembly Version: 10.2.4.0
    Win32 Version: 10.2.4.0
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/DevExpress.XtraEditors.v10.2.DLL
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
msvcm90
    Assembly Version: 9.0.30729.4926
    Win32 Version: 9.00.30729.4926
    CodeBase: file:///C:/Windows/WinSxS/amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_08e1a05ba83fe554/msvcm90.dll
----------------------------------------
System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
AnimationPlay
    Assembly Version: 1.0.5326.41397
    Win32 Version: 1.0.5326.41397
    CodeBase: file:///C:/Users/Stem/Documents/NVil-Aug-01-14/AnimationPlay.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.

« Last Edit: August 01, 2014, 02:15:13 pm by steve »

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon

  • No avatar
  • Posts: 2103
  • Polygon
August 01, 2014, 11:00:42 pm
Hi IStonia,

The spline "close/exit" issue appears to be fixed. Thank you.

On quick tests, looking good. I need to start testing all spline related tools/functions again, so will post back results later.

--------------------------------------

After more testing, I am seeing some minor issues, but as they are easily avoidable or correctable (or may not even be seen) by user, I do not think they are worth changing the code for (IMHO).

Many thanks for taking the time to make these changes/improvements.

« Last Edit: August 02, 2014, 09:41:38 am by steve »

  • No avatar
  • Posts: 306
  • Triangle
October 21, 2014, 10:32:09 am
http://take.ms/WnD5v

Double mesh & select problem

  • No avatar
  • Posts: 2103
  • Polygon
October 21, 2014, 10:48:14 am
http://take.ms/WnD5v

Double mesh & select problem

The spline you have created is on both sides of the mesh. Zoom in to the spline and check.