Skip to content

[SOLVED] .split() is ignoring keepTop and keepBottom #1331

Answered by aaroncaba
aaroncaba asked this question in Q&A
Discussion options

You must be logged in to vote

After further digging I found the .solids() method to keep only one of the solids. I used the DirectionMinMaxSelector with the same normal vector as the face:

normal = cq.Vector(0.2,-1,0)
ff = cq.Face.makePlane(None, None, cq.Vector(0, 0.1, 0), normal)
splitPrism = prism.split(ff,  keepBottom=True).solids(cq.DirectionMinMaxSelector(normal,False))

This solved my issue and now I just keep the parts that I want.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aaroncaba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant