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.
some featurescript questions
joshtargo                
                
                    Member Posts: 446 EDU                
            - How do I return a point where a plane intersects a curve?
 - I'm doing multiple transforms on a curve, but some transforms are optional. I found it confusing to keep multiplying transforms to build one big final transform, so I want to split it up into steps. I referred to the result of the first transform with qcreatedby, but if some later transforms are optional, I won't necessarily know which function created the curve that needs to be transformed again. How do I refer to the object?
 - How do I render a line for debug purposes if all I know is the origin and direction vector?
 - can I render objects (planes, curves, lines, points) in bright orange to help the user visualize what the tool will do?
 
0    
            Best Answers
- 
            
NeilCooke
                        
                        
                            Moderator, Onshape Employees Posts: 5,912 
                        
                    - evDistance
 - Go with the multiply option, it will be easier and faster
 - addDebugLine
 - addDebugEntities
 
Senior Director, Technical Services, EMEA1 - 
            
MichaelPascoe
                        
                        
                            Member Posts: 2,629 PRO                        
                    Like this @josh_targo
const point1 = WORLD_ORIGIN; const direction = XY_PLANE.normal; const distance = 5 * inch; const point2 = direction * distance; addDebugLine(context, point1, point2, DebugColor.RED);
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴0 - 
            
NeilCooke
                        
                        
                            Moderator, Onshape Employees Posts: 5,912 
                        
                    Or you could simply just
debug(context,line(point, direction), DebugColor.RED);Senior Director, Technical Services, EMEA0 
Answers
Interesting, I will have to see if I can make these work (I'm not a programmer). Thanks.
addDebugLine requires 2 points, but I only have the origin and a direction (from a cross operation). how do I get a second point?
Like this @josh_targo
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Or you could simply just
debug(context,line(point, direction), DebugColor.RED);ok, getting somewhere!