Message 1 of 8

Not applicable
10-20-2020
12:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.
I believe convertToSplineShape() is what you're looking for. See the example in this help topic:
https://help.autodesk.com/view/MAXDEV/2021/ENU/?guid=GUID-026FCDF6-0944-4A22-A233-61506F67C58C
Hope that helps,
Drew
(
s = instance $ name:#blah
converttosplineshape s
)
That is not the same thing, the Create button does a cleanup of overlapping segments and welds the parts into usable shape, while converting to spline does none of those things.
@Swordslayer wrote:That is not the same thing, the Create button does a cleanup of overlapping segments and welds the parts into usable shape, while converting to spline does none of those things.
true... thanks!
@Swordslayer wrote:That is not the same thing, the Create button does a cleanup of overlapping segments and welds the parts into usable shape, while converting to spline does none of those things.
I've looked at the related code (example in SDK) ...
Yes, the developers do additional processing and optimization of the resulting spline object, although they themselves admit its dubious value. In general, if the conversion to splineshape is not sufficient for the task and cannot be solved by the splineshape methods after conversion, then it is unlikely that "Create Shape" will do much better.
I used sectioning recently in a customer project and ended up writing a lot of MXS code (also for working around of AD bugs). Honestly, If I need sectioning again, I will start with my own algorithms in C++.
Thanks I was looking at this function but didn't think it would do as expected. And making an instance copy preserved the Section for later use, as I'm wanting to slice a Displace(d) image plane at several Z levels (think: Mount Rushmore).
I'll post my script for others when done, like:
for z = min to max by zincr do (
s = instance $ name:#blah+z
converttosplineshape s
select s
modPanel.addModToSelection(SplineRelax()) ui:on
$.modifiers[#Spline_Relax].showknots = on
$.modifiers[#Spline_Relax].amount = 1.0
modPanel.addModToSelection(Optimize_Spline()) ui:on
$.modifiers[#Spline_Relax].showknots = on
$.modifiers[#Spline_Relax].PERCENT = 80
modPanel.addModToSelection(Extrude()) ui:on
$.modifiers[#Spline_Relax].amount = 2.0
modPanel.addModToSelection (Cap_Holes ()) ui:on
)