
Not applicable
07-22-2019
09:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey,
I thought its an easy task to do but...yeah.
I need a sketch to extrude some profiles out of an user selected face - but if I check if the profile is on that face with
isOnFace = faceEvaluator.isParameterOnFace(sketchPoint2D)
I always have some weird offsets and orientation problems like this (the center point of every circle should be within the face):
What I do so far:
#select a face selectedFace = ui.selectEntity("select Face", "Faces").entity #prepare matrix rangeX = range(1-arraySize, arraySize, 2) rangeY = range(1-arraySize, arraySize, 2) # go thru for nowX in rangeX: for nowY in rangeY: sketchPoint2D = adsk.core.Point2D.create(nowX, nowY) sketch.sketchCurves.sketchCircles.addByCenterRadius(sketchPoint, 0.4) isOnFace = faceEvaluator.isParameterOnFace(sketchPoint2D) if isOnFace: #extrude Circle
In some cases the hittest is mirrored or not matching the selected face and sometimes its all fine.
Can someone give me a hint what I'm doing wrong here?
Thanks in advance!
Solved! Go to Solution.