3D MODELING OF KNITTED LOOPS GEOMETRY

3D MODELING OF KNITTED LOOPS GEOMETRY

arnold55577
Enthusiast Enthusiast
1,107 Views
7 Replies
Message 1 of 8

3D MODELING OF KNITTED LOOPS GEOMETRY

arnold55577
Enthusiast
Enthusiast

Hi Friends,

 

Anyone can help me for script to generate a knitted loop?

The image i have done using NURBS modeling, but i need to do it by scripting.

I urgently need your help.

 

Thank you very much.

 

MKI

0 Likes
Accepted solutions (2)
1,108 Views
7 Replies
Replies (7)
Message 2 of 8

Alfred.DeFlaminis
Alumni
Alumni
Accepted solution

Hello @arnold55577,

 

I'm afraid nothing has changed much since the other threads.  A NURBS Curve is really just a regular spline with a different menu and can be converted from a regular spline shape to a NURBS curve.  You can find the MaxScript help here.  

 

Personally I think it would be easier to use a spline for this, then convert it to NURBS.  It's not a simple ask to get a script for this so it's too bad that the .mcg wouldn't work for that issue.  You could probably hire someone to write this script for you for relatively cheap if you pick the right country.  

 

If I were you I'd also look at scripts that generate say a chain link fence or something of that nature and look at the syntax and scripting elements to see if you could sort of wrestle it into shape.  (With permission, of course.)  

 

Please hit the "Accept as Solution" button if my post fully solves your issue or answers your question. This lets me know that I was effective in helping you, and thank you for doing so.


Best Regards,

0 Likes
Message 3 of 8

arnold55577
Enthusiast
Enthusiast

Attention Mr. Alfred,

 

Dear Sir,

 

Thank you very much for your support.

Please note that I had already tried to do the loops using the NURBS principle and that the MCG tool is licesnsed and too easy to apply.

 

In my case, I will have to develop the loops using MaxScript by including the Mathematical equations, this is where Iam stuck.

So far, I've been able to generate a spline line and an arc through script. I would well appreciate your help.

 

 

Regards,

Imrith MK

0 Likes
Message 4 of 8

Alfred.DeFlaminis
Alumni
Alumni

Hello @arnold55577,

 

If you want to PM me what you have so far I can take a look, but I am by no means an expert max scripter.  I have managed to get some scripts working in the past but I'm no programmer.  I have posted advice info in your other thread.

 

Best Regards,

0 Likes
Message 5 of 8

arnold55577
Enthusiast
Enthusiast

Attached is the script from Help,

Pics are done by splines

0 Likes
Message 6 of 8

Alfred.DeFlaminis
Alumni
Alumni
Accepted solution

Hello @arnold55577,

 

I'm going to try to use the right language here but I don't have a programming background.  The original script is the following:

 

--

fn drawLineBetweenTwoPoints pointA pointB =
(
ss = SplineShape pos:pointA
addNewSpline ss
addKnot ss 1 #corner #line PointA
addKnot ss 1 #corner #line PointB
updateShape ss
ss
)
newSpline = drawLineBetweenTwoPoints [10,20,30] [100,200,10]

--

 

 

So, to add to this we only need to do the following:

 

--

fn drawLineBetweenTwoPoints pointA pointB pointC=
(
ss = SplineShape pos:pointA
addNewSpline ss
addKnot ss 1 #corner #line PointA
addKnot ss 1 #corner #line PointB
addKnot ss 1 #corner #line PointC
updateShape ss
ss
)
newSpline = drawLineBetweenTwoPoints [10,20,30] [100,200,10] [160,20,30]

--

 

We could take it further as shown below.  My X,Y,Z positions are just made up on the spot, so you'll want to find the right values there. 

 

--

fn drawLineBetweenTwoPoints pointA pointB pointC pointD pointE pointF pointG pointH=
(
ss = SplineShape pos:pointA
addNewSpline ss
addKnot ss 1 #corner #line PointA
addKnot ss 1 #corner #line PointB

addKnot ss 1 #corner #line PointC
addKnot ss 1 #corner #line PointD

addKnot ss 1 #corner #line PointE

addKnot ss 1 #corner #line PointF

addKnot ss 1 #corner #line PointG

addKnot ss 1 #corner #line PointH
updateShape ss
ss
)
newSpline = drawLineBetweenTwoPoints [10,20,30] [100,200,10] [160,20,30] [180,200,30] [200,20,30] [250,200,30] [270,20,30] [290,200,30]

--

 

If you follow the color codes here, I think it makes it easier to add new points.  I just want to repeat that the coordinates I put in at the bottom are just made up, you'll want to enter those yourself with the correct values.  I hope this helps!


Best Regards,

Message 7 of 8

arnold55577
Enthusiast
Enthusiast

Hello Alfred,

 

Regarding the sunlight tool in 3dsMax,

Can it be related to the "global solar radiation"?

Does it have specifications like wavelength of Ultraviolet radiation

0 Likes
Message 8 of 8

Alfred.DeFlaminis
Alumni
Alumni

Hello @arnold55577,

 

I'm afraid not, I don't believe that 3ds Max has a tool (plugin or otherwise) that relates to radiation.  I tried to find something via Google but failed.  There used to be a software called Ecotect that did this, but it has since been bundled into Revit from what I understand.  So, Revit may have that which you need for this issue.

 

Best Regards,  

0 Likes