Notifications
Clear all
[Closed] create rectangle with line segments
Aug 09, 2004 10:24 am
hi all
this one i want i think is very simple. just
creat rectangle with lines??<<i wana command to do that i studied hard in script but line was very hard and i couldnt create rectangle tnx :banghead:
1 Reply
Aug 09, 2004 10:24 am
Hi.
Here’s how You can create 4 lines to get rectangular shape. If You don’t want 4 separate lines but a single shape just weld their vertices.
rect_shp1 = splineshape()
convertToSplineShape rect_shp1
addnewspline rect_shp1
addknot rect_shp11 #corner #line [10,10,0]
addknot rect_shp11 #corner #line [10,-10,0]
rect_shp2 = splineshape()
convertToSplineShape rect_shp2
addnewspline rect_shp2
addknot rect_shp21 #corner #line [10,-10,0]
addknot rect_shp21 #corner #line [-10,-10,0]
rect_shp3 = splineshape()
convertToSplineShape rect_shp3
addnewspline rect_shp3
addknot rect_shp31 #corner #line [-10,-10,0]
addknot rect_shp31 #corner #line [-10,10,0]
rect_shp4 = splineshape()
convertToSplineShape rect_shp4
addnewspline rect_shp4
addknot rect_shp41 #corner #line [-10,10,0]
addknot rect_shp41 #corner #line [10,10,0]
updateShape rect_shp1
updateShape rect_shp2
updateShape rect_shp3
updateShape rect_shp[size=2]4
[/size]