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.
Extrude up to body, up to face, booleans, performance
S1mon
Member Posts: 3,957 PRO
With Parasolid and FeatureScript performance in mind, I'm trying to figure out the best approach to creating a lot of features which a normal user would use "up to next"/add.
As a regular CAD user, with things like bosses and ribs on injection molded parts, whenever I've been working complex models for a while, each extrude "up to body" seems to make the model slower and slower. My theory is that the trim edges for the complex surface becomes that much more complicated over time, and whatever searching over the topology happens internally goes up exponentially with the number of intersections.
In FeatureScript, in the interest of finding the correct targets and simplifying the end face for extrude up to, I've been trying to use a lot of raycasts, and sometimes fitting a plane to make a flat analytic thing to extrude to. In some cases extruding just a little beyond that plane, so there's definitely an overlap.
Is this a waste? Should I just always be using "up to next"? As an end user, I've found there are times when extruding just past the target and booleaning that can perform much better than things that are theoretically touching.
What's the best way to analyze this? I know there are timer calls I can do. What's the right way to profile FS code?
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
Comments
One thing to try is to make one single target set of faces or surface retrieved from opSplitBySelfShadow of the target body. Use it for all extrudes and then merge them to target, or extrude everything blind/through all, and trim with that tool before merging with target
Very interesting idea. I searched through the std library, and opSplitBySelfShadow doesn't seem to be used any where. rib.fs does some Boolean intersections of stuff that's extruded blind to a distance based on the bounding box and throws away the bad bits.
Any examples of public features where opSplitBySelfShadow is used?
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
Hm, I'm not sure about examples, but it's a narrowed version of opSplitByIsocline with zero isocline angle and handy return of grouped side face queries
I definitely understand the concept. Early in my career, I did surface modeling in Pro/E essentially that way. Up until late in the CAD model, there was a set of core side surfaces and and a set of cavity side surfaces. It was much easier to do a much of surface merges (includes the trims) for internal features like ribs and bosses that way.
Any thoughts on tracking time to profile performance?
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
Have you tried the built-in profiling tools? https://cad.onshape.com/FsDoc/debugging-in-feature-studios.html
@S1mon not a direct answer to your question, but one way to go about a feature like this is to make sure your major steps are functionalized. That way you can start with the easy-to-write function, and later swap it with the long-but-optimal function later without breaking everything else. That way you can get to MVP level with the feature faster and only fix things that annoy you upon real use.
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
@EvanReese I struggled with this a lot with my sheet metal feature implementations. There are a lot of easy intuitive ways to do sheet metal features that are abysmal performance hogs to the end user. Right now I've got a janky implementation of a stitch bender feature that I'm holding off on deploying because the project it's intended for already has a 120 second rebuild before adding the feature and I'll easily add another 60 seconds to it if I don't optimize beforehand.
Derek Van Allen | Engineering Consultant | Meddler