Use of element_controller.slice_elements_with_plane_and_get_new_elements() #246
Unanswered
ancelin-charpentier
asked this question in
General
Replies: 2 comments
-
|
I have a function that cuts opening bodies at the outer edge of the wall. maybe that will help you. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Example with usage of cwmath import sys
import cadwork
import element_controller as ec
from cwmath.cwplane3d import CwPlane3d
from cwmath.cwvector3d import CwVector3d
if __name__ == '__main__':
element_ids = ec.get_user_element_ids()
plane_normal = CwVector3d(0.000000, -0.500000, 0.866025)
plane = CwPlane3d(CwVector3d(-42.500000, 1644.450845, 3432.000000),
plane_normal)
distance = plane.distance_to_point(CwVector3d(0.0, 0.0, 0.0))
for element_id in element_ids:
print(ec.cut_element_with_plane(element_id,
cadwork.point_3d(*plane_normal),
distance)) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there,
I tried to build an API that would divide a panel and the only function I could think of is : element_controller.slice_elements_with_plane_and_get_new_elements(arg0: int, arg1: point_3d, arg2: float)
But no matter how I try I cannot find a way to set the plan orientation that I want. (Basically parallel to panel faces)
Do you have a sample to display how it works? Or would you recommend any other function?
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions