Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Beams feature problems
MBartlett21
Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
The beams feature won't take projected curves as input.
Is there any reason for this?
Is there any reason for this?
0
Best Answers
-
MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭@NeilCooke
I have now fixed the problem.
I replaced this line of code</code>loopPlane = evPlane(context, { "face" : qGeometry(qEdgeAdjacent(firstEdge, EntityType.FACE), GeometryType.PLANE) });</pre><div><a rel="nofollow" href="https://forum.onshape.com/discussion/comment/38753#"></a></div><br>with this block of code<br><pre class="CodeBlock"><code> try { // this will be two faces so just have to return the first loopPlane = evPlane(context, { "face" : qGeometry(qEdgeAdjacent(firstEdge, EntityType.FACE), GeometryType.PLANE) }); } catch { const lineResult = evAxis(context, { "axis" : firstEdge }); definition.axis = lineResult; var baseNormal = perpendicularVector(lineResult.direction); var normal = rotationMatrix3d(lineResult.direction, 0 * degree) * baseNormal; return plane(lineResult.origin, normal, lineResult.direction); }
It now works fine.
0 -
tim_doctor Member Posts: 1 ✭@NeilCooke
Bumping this old thread because I'm having the exact same issue described above using v18 of the Beams Feature. I have a Projected Curve between two straight lines. Beam feature fails and seems to not like using a projected curve as an input. Obviously, I don't really know how to read FeatureScript code to figure this out for myself. Has @MBartlett21 's solution not been rolled in to the official version of the Beam Feature?
Here's a dummy model showing what I'm looking at. Beams works with sketch entities, but doesn't like the projected curve... even though it's a line. What am I missing?
0 -
NeilCooke Moderator, Onshape Employees Posts: 5,683@tim_doctor - I must admit I don't recall seeing this code (sorry @MBartlett21) - I've added it (without QA) to V19
Senior Director, Technical Services, EMEAI0
Answers
I created it by making a projected curve between two straight lines.
If I create a plane, then make a sketch on it and project those lines into the sketch, the Beam feature works fine like that.
IR for AS/NZS 1100
The filter is: EntityType.EDGE && (GeometryType.LINE || GeometryType.ARC)
I don't think that would be a problem
IR for AS/NZS 1100
I copied it here and it is this section of code that is having a problem:
IR for AS/NZS 1100
I have now fixed the problem.
I replaced this line of code
It now works fine.
IR for AS/NZS 1100
Bumping this old thread because I'm having the exact same issue described above using v18 of the Beams Feature. I have a Projected Curve between two straight lines. Beam feature fails and seems to not like using a projected curve as an input. Obviously, I don't really know how to read FeatureScript code to figure this out for myself. Has @MBartlett21 's solution not been rolled in to the official version of the Beam Feature?
Here's a dummy model showing what I'm looking at. Beams works with sketch entities, but doesn't like the projected curve... even though it's a line. What am I missing?