Jump to content

Extract Loft/Surface isolines


syhdesign

Recommended Posts

Hello Dear All,

 
I'm struggling since 3 years about that issue, maybe someone can help about it;
 
As you can see down below i have kind of vortex shape (surface) and would like to extract u and v isolines as polyline or spline for that extractisoline command just giving random splines, xedges command giving only top and bottom circles, if i convert that shape into mesh it's giving distorted mesh body, i can't also snap intersection of isolines to drawing with 3dpoly, i have no idea left can someone tell me what can i do more?
I just need exact position of isolines itself or intersection points.
 
Note: I found that script many years ago but won't work either!
Script:https://adndevblog.typepad.com/autocad/2014/03/extracting-isolines-from-surface.html
 
Thank you and Best Regards

surface.JPG

Link to comment
Share on other sites

 

tenor.gif?itemid=5494204

 

But i tried to rebuild something similar, with 3 circles, using loft to create a solid and then explode it to a surface that looks like your image.

 

i don't know how to get lines from a surface in autocad, but i tried Civil 3D, but it doesn't seem to recognize the object as a surface.  At least i can't extract any lines from it there either...

 

i do however found the command 'SURFEXTRACTCURVE' (works in regular AutoCAD too), where you can create your own (SP)LINES.  Using D(irection) to get the  Vertical and Horizontal plane.

White is exploded loft object,  the red lines are the ones that were extracted manually.

red lines.png

Edited by OMEGA-ThundeR
result image
Link to comment
Share on other sites

Hey there @OMEGA-ThundeR

giphy.gif

 

Thank you for your respond, that command 'surfextractcurve' in Civil 3d equal 'extractisoline' command  in autocad. Really cool tool but i need to snap exact isolines as i created not random isolines on surface. I hope one day i will find solution, nevertheless thank you

 

Cheers 

Link to comment
Share on other sites

As you probably know, isolines are lines with a constant value for one of the two independent variables (u and v) of a parametric surface. Although AutoCAD surfaces are NURBS based I believe the default construction yields a 3rd order B-spline.  I've created an Excel custom function that accepts as input the independent variable u, the spline degree, and a list of control vertices.  Using Excel I thought I would enter a value for u and get a corresponding point that would locate the isoline.  You could use this point with the SURFEXTRACTCURVE command to create the isoline you want. Since your example has a value of 6 for the number of isolines this should mean that the delta u value is 1/7 of the range of u for each isoline. The range of u is equal to  the number of CVs minus the spline's degree.

I tried this theory out and although the results were close they were not exact.  I am missing something.

 

Alternatively, although not an exact solution to your goal, I think you can get a pretty accurate result using SURFEXTRACTCURVE by zooming into an isoline and positioning the extracted isoline spline on top of the surface,

 

Link to comment
Share on other sites

Hey @lrm,

 

Thank you very much for your respond and theory, very interesting approach, I'm keep searching and trying a solution. 

Link to comment
Share on other sites

18 hours ago, lrm said:

As you probably know, isolines are lines with a constant value for one of the two independent variables (u and v) of a parametric surface. Although AutoCAD surfaces are NURBS based I believe the default construction yields a 3rd order B-spline.  I've created an Excel custom function that accepts as input the independent variable u, the spline degree, and a list of control vertices.  Using Excel I thought I would enter a value for u and get a corresponding point that would locate the isoline.  You could use this point with the SURFEXTRACTCURVE command to create the isoline you want. Since your example has a value of 6 for the number of isolines this should mean that the delta u value is 1/7 of the range of u for each isoline. The range of u is equal to  the number of CVs minus the spline's degree.

I tried this theory out and although the results were close they were not exact.  I am missing something.

 

Alternatively, although not an exact solution to your goal, I think you can get a pretty accurate result using SURFEXTRACTCURVE by zooming into an isoline and positioning the extracted isoline spline on top of the surface,

 

 

 

It's quite possible that the cross section in the U direction is periodic - which will throw a wobbler in some of the conventional notions of B-Spline evaluation.  See attached.  Compare one of the originating curves (layer 0) with SURFEXTRACTCURVE derived Isolines (layer UIso)

Isolines.dwg

Link to comment
Share on other sites

Wooah @SEANT you made it,

 

Can you please explain a bit how did you do that step by step, did you used excel as @lrm try to do or other kind of approach? Is it possible to make a script for complete progress ?

I'm super excited. Thank you

Link to comment
Share on other sites

@seant,

Can you explain the "wobbler" factor?

 

Also, how did you determine the location when using the SURFEXTRACTCURVE function?

 

I've attached my macro-enabled Excel file with the custom B-spline function. Please let me know if you find any errors in it.

 

B-Spline-Calculator.xlsm

Link to comment
Share on other sites

6 hours ago, syhdesign said:

Wooah @SEANT you made it,

 

Can you please explain a bit how did you do that step by step, did you used excel as @lrm try to do or other kind of approach? Is it possible to make a script for complete progress ?

I'm super excited. Thank you

The process is not for the faint of heart.  First, a person has to be comfortable with setting up and using 'beta' release software.  This add-in specifically:

.

 

That Add-in can be seen in action here:

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/screencast/Main/Details/a3afe1be-968d-421c-81f6-167c375abfca.html

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/screencast/Main/Details/1d47a745-4bd2-4bef-9e5d-8cd087553ac6.html

 

The latest version  (still in testing phase) handles Solids and Surfaces, and I used that to get locations for the Isocurves.  The beta in that link only handles solids so you would need to copy the surface, SurfScult it into a solid, evenly divide the resultant UVMap into 7 sections, that project back to the solid.  Those positions align with those of the original surface.

  • Like 1
Link to comment
Share on other sites

@lrm

 

AutoCAD treats Nurbs curves and surfaces slightly different than most other software.  Upon examination, the periodic spline (layer 0 in the previous attachment) has only 3 Control Vertices - as can be seen, and as declared by the LIST command.  But we know that a Degree 3 curve needs at least 4 (degree +1) CVs.

 

In actuality, that periodic curve has 6 CVs, AutoCAD just hides evidence of 3 of them.  Autodesk is doing something behind the scenes that make managing periodic nurbs curves a little easier for the developers, but not necessarily in accordance with the classic Nurbs mechanics.

 

The more conventional setup would overlap a few of the CVs, but have a knot vector without multiplicity.  

 

Granted, just about everything I've said above is clear as mud - just no good way to verbally explain the geometric/algorithmic trickery of Nurbs curves.

 

Somewhere along the way I'll look at your xlsm.  Unfortunately, my VBA skill are quite rusty.

 

 

Edited by SEANT
Edit
Link to comment
Share on other sites

@SEANT

 

Hidden CVs. Interesting! Who would have known?  That helps to explain the difference between the original spline and the one you created on layer 0.  While creating creating the Excel file I did increase my knowledge of the use of knot vector multiplicity but do not feel I have the topic mastered.  Thank you for the addition insight. 

Link to comment
Share on other sites

On 5/17/2019 at 8:15 PM, SEANT said:

The process is not for the faint of heart.  First, a person has to be comfortable with setting up and using 'beta' release software.  This add-in specifically:

.

 

That Add-in can be seen in action here:

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/screencast/Main/Details/a3afe1be-968d-421c-81f6-167c375abfca.html

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/screencast/Main/Details/1d47a745-4bd2-4bef-9e5d-8cd087553ac6.html

 

The latest version  (still in testing phase) handles Solids and Surfaces, and I used that to get locations for the Isocurves.  The beta in that link only handles solids so you would need to copy the surface, SurfScult it into a solid, evenly divide the resultant UVMap into 7 sections, that project back to the solid.  Those positions align with those of the original surface.


Omg 3 years of mystery has solved, next level engineering here, thank you very much @SEANT for sharing that, working pretty well
Cheers

Link to comment
Share on other sites

Ah, very good.  Getting that routine up and running requires some serious familiarity with AutoCAD,  and MS Windows as well.  Props to you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...