Is there any way to determine the position of the cutting point on the model when dividing

785
4
09-03-2022 01:53 AM
Labels (1)
biaozeng
New Contributor III

biaozeng_0-1662195035535.png

The first gray figure is the original shape, the red line is the cutting line I want, the middle is the actual cutting effect, and the bottom is what I want when I manually modify the shape

 

 

0 Kudos
4 Replies
biaozeng
New Contributor III

biaozeng_0-1662201750637.png

I want to get the elevation effect on the left side instead of the repetitive effect on the right side based on each face. I tried to use UV segmentation, but it seems to not work

 

0 Kudos
biaozeng
New Contributor III

biaozeng_1-1662202026353.pngI used UV segmentation, but it still starts with each face. I hope these faces in front of me can apply a segmentation rule as a whole

 

0 Kudos
ElliotHartley
Occasional Contributor

Hi I saw this and I think there is a way as I've worked on this before, but it depends on your initial shape (it won't work on all) based on what you've asked here you can use the information stored about edge length and combine it with a split recursion.  Basically obtain the edge lengths as an array :
edgeLength = scope.sx

attr edgesNumber = geometry.nEdges
attr egdeLengthArray = comp(e){border:edgeLength}

Then in the rule do some kind of split recursion...


Footprint-->
SplitArray(1,edgesNumber)

SplitArray(indx,mx)-->
case indx ==mx : NIL
else :
split(z){~1:SplitArray(indx+2,mx)|edgeLengthArray[indx]: x}

You will need to rotatescope to ensure the split works and you might also need to change the indx it starts on (depends on what 0 edge is).  Hope this helps!

 

Elliot

0 Kudos
biaozeng
New Contributor III

Thank you very much for your reply. It really helped

0 Kudos