Skip to content

Clip an assembly to create a section for 2D drawing #1930

@Jopie01

Description

@Jopie01

I have an assembly with more then 100 parts created from straight beams to more complex extrusion profiles. Dimensions of the assembly are 8 x 2 x 2 meter. I have created a special DXF export system to create drawings from that assembly. To create the views I use HLRBRep_Algo which works very well.

However I want to create a section to show some internals. Currently I create a new Compound from the assembly, take the bounding box and create a larger box to cut about 90% of the assembly away. Then I can create a view which represents the section.

Some code:

side = cq.Workplane('XY').add(assy.toCompound())
bb = side.val().BoundingBox()

# based on the boundingbox create a set of points and draw a polyline and extrude
cutbox = (cq.Workplane('XY')
    .polyline(pts)
    .close()
    .extrude(bb.zlen + 10, both=True))

# create the cut
side_section = side.cut(cutbox.val())

# the side_section can now be used to represent a section view

But cutting takes a lot of time, it doubles the execution time. So I'm looking for something to use clipping in combination with the HRLBrep_Algo. Would this be even possible with OCC? Or do I need some other method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions