Creating OccBrep from Pipe

Hello together, I’m making myself a bit familiar with compas, and I’m a bit lost.

Im trying to create a Brep out of a Curve and a radius as a standalone file.

curve_points: List[Point] = [Point(0, 0, 0), Point(0, 0, 10)]

base_curve = NurbsCurve.from_points(curve_points)

pipe_radius: float = 10.0

pipe = OCCBrep.from_pipe(base_curve, pipe_radius)

I’m getting a

raise PluginNotInstalledError
compas.plugins.PluginNotInstalledError

When i for example do e.g. OCCNurbsSurface.from_extrusion() this works

What am I missing?

Thanks already in advance!

hi,

compas.geometry.Brep.from_pipe is a pluggable function that hasn’t been implemented with compas_occ yet.

compas uses compas_occ (with OCC as a backend) and compas_rhino (with RhinoCommon as a backend) for Nurbs and Brep functionality. it will autoamatically switch between them depending on which environment you are working in…

ideally, as a user, you can always just use compas.geometry and don’t have to bother switching between compas_occ and compas_rhino depending on the context. therefore, the script you are trying to run should both inside and outside of Rhino be the same:

from compas.geometry import Brep, NurbsCurve, Point

points = [Point(0, 0, 0), Point(0, 0, 10)]
curve = NurbsCurve.from_points(points)
radius = 1.0
pipe = Brep.from_pipe(curve, radius)

unfortunately, in this case, Brep.from_pipe has not been implemented in compas_occ yet. so this will not work. also not when you import a Brep directly from compas_occ.

if you file an issue on the issue tracker of compas_occ someone will take care of the missing plugin asap…